因为编译的机器装了centos 6.5,上面的gcc比较新是4.7,而外面运行的机器试centos5.6,所以编译的程序放到上面跑了之后就会出现 /lib64/libc.so.6: version `GLIBC_2.8' not found等错误(就是libc的版本太低,不支持2.8,我们可以用命令 strings /lib64/libc.so.6 | grep GLIBC_来看库支持的版本)。 所以打算在编译的机器上重新装一个4.1.2的gcc。
安装的基本步骤没什么好说的,就是下载源码 ——》configure ——》 make ——》make install。但是过程却没这么顺利,中间出现了很多问题。
1)configure 没有错误,但make的时候出现 错误
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.