安装GCC-4.1.1,问题解决
来源:互联网 发布:最新网络搞笑段子 编辑:程序博客网 时间:2024/06/05 14:51
今安装GCC-4.1.1,遇到问题于下,(复制别人的,参考:http://www.linuxdiyf.com/bbs/thread-159161-1-1.html。因问题一样,但我已经完整解决该问题)
由于某种需要,需要把Fedora11 gcc的版本降到4.1.1,使用yum install gcc只会更新现有版本,不降反升了,那么只能通过其它途径进行安装,其过程如下:
1、先下载gcc-4.1.1.tar.bz2文件于/tmp目录下,并对其进行解压,于是在/tmp下有了gcc-4.1.1目录,它就是gcc-4.1.1的源目录
2、在/tmp下再建立一个gcc-4.1.1-bulid目录,作为gcc-4.1.1的目标目录。
3、在/usr/local下建立gcc-4.1.1-dest目录,作为gcc-4.1.1的配置目录。(需要root权限,所以可以这么做:sudo mkdir /usr/local/gcc-4.1.1-dest)
4、在gcc-4.1.1-bulid目录下(必须的),执行以下命令:
/tmp/gcc-4.1.1/configure --prefix=/usr/local/gcc-4.1.1-dest --enable-threads=posix --disable-checking --enable--long-long --with-system-zlib --enable-languages=c,c++,java(在http://hi.baidu.com/boyliupan/bl ... 259985800a18d2.html上还加了选项:--host=i386-redhat-linux,我不知它是什么意思,而且加了提示找不到i386-redhat-linux,于是没有加,其它选项也不知其意) //注by_benhu:我去掉了:--host=i386-redhat-linux,因为我的是X86_64,
5、进行编译,执行: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.
make[3]: *** [fastjar.info] 错误 1
make[3]: Leaving directory `/tmp/gcc-4.1.1-build/fastjar'
make[2]: *** [all] 错误 2
make[2]: Leaving directory `/tmp/gcc-4.1.1-build/fastjar'
make[1]: *** [all-fastjar] 错误 2
make[1]: Leaving directory `/tmp/gcc-4.1.1-build'
make: *** [all] 错误 2
此错误解决:
安装英文提示:可知是因为缺少依赖包Texinfo或GNU MAKE包,前者包含后者。
在目标文件目录下运行:$ yum install texinfo
安装完毕,查看makeinfo所在目录:
$ whereis makeinfo,
显示:usr/bin/makeinfo。
3、修改/tmp/gcc-4.1.1-bulid目录下的Makefile,把.../missing makeinfo改成usr/bin/makeinfo.
重新执行:make
又冒出新的错误:error: gnu/stubs-32.h: No such file or directory
我到/usr/include/gnu下一看,果然没有这一头文件,于是:
执行:yum -y install glibc-devel
但是还是冒出同样的问题,在看/usr/include/gnu下的文件,有一个stubs-64.h的头文件。可能我的是X86_64的,所以只有这一文件,不支持i386,为了得到stubs-32.h,支持这个编译器,我安装了一个i386arch的glibc-devel.i386的包:
运行:yum -y install glibc-devel.i386
再重新在gcc-4.1.1-build中make,
一切OK!
- 安装GCC-4.1.1,问题解决
- 安装GCC 问题解决
- buffer overflow detected问题解决及gcc-4.1安装
- Ubuntu安装gcc编译器及遇到问题解决
- Ubuntu12.04下安装GCC方法及问题解决
- 安装gcc-4.1.0
- gcc-4.1.2安装
- gcc-4.1安装
- 安装 gcc-4.1.2
- 安装 GCC-3.3.1
- gcc 4.8.1 安装
- ccs5.1安装问题解决
- RedHat安装Gcc.4.1.2
- Ubuntu 11.04安装gcc 4.5.2以下版本[比如gcc 4.1.1]
- RHEL5.1下安装GCC
- 编译安装GCC 4.5.1
- RHEL6.1下安装gcc
- CentOs 安装gcc 4.8.1
- 移植心得---android平台
- 几道智力题,一起分享
- C#通用DAO实现(三)
- Velocity基本语法
- SQl 语句(常见) 新建,删除,修改表结构
- 安装GCC-4.1.1,问题解决
- CSS透明属性详解
- reportviewer 用xml方式 动态修改rdlc
- Oracle RMAN相关资料
- Linux常用shell命令
- DOS命令
- [转]C#.net编程创建 Access 文件和 Excel 文件
- C#通用DAO实现(四)
- 天安保险车险条款2009版终于发布了!