安装ruby ./configure时出现错误:

C preprocessor "/lib/cpp" fails sanity check

原因: 缺少包安装linux-kernel-headers.

解决: 有桌面系统进入yast2搜索linux-kernel-headers安装. 没有桌面系统去http://rpm.pbone.net/搜索下载rpm安装.

下载地址:

wget ftp://ftp.pbone.net/mirror/ftp.opensuse.org/distribution/11.2/repo/oss/suse/noarch/linux-kernel-headers-2.6.31-3.4.noarch.rpm
rpm -ivh linux-kernel-headers-2.6.31-3.4.noarch.rpm

成功安装.