更新gcc的时候出现了错误 dnfyum install gcc 失败*

查看:2482|回复:2
我是在win8系统下安装了VMware10,再安装的RHEL5.4。为了安装OpenCV2.4需要升级gcc。
我是安装下面的流程进行安装gcc及其依赖包的。但是最后在gcc编译时,make出错了。
1、&&安装gmp
注:安装均在root权限下进行:
[phamlab@Server ~]$ su –
[root@Server ~]# cd /home/phamlab/software/gcc_install/
[root@Server gcc_install]# ls
[root@Server gcc_install]# tar jxvf gmp-4.3.2.tar.bz2
[root@Server gcc_install]# cd gmp-4.3.2
[root@Server gmp-4.3.2]# ./configure
[root@Server gmp-4.3.2]# make
[root@Server gmp-4.3.2]# make check
这一步是必要的,用来查看有没有文件不匹配或缺失,在最后提示,到时注意看有没有 Error 之类的提示,如果没有则说明安装正常.
[root@Server gmp-4.3.2]# make install
安装编译后的软件,完成了安装过程
有必要说明程序的头文件(.h)和库文件(lib*)的位置, 本次安装会安装在&&/usr/local/include&&和/usr/local/lib& &这个对后面安装 mpfr 很有作用.
2、&&安装 mpfr
[root@Server gmp-4.3.2] cd ..
[root@Server gcc_install]# tar jxvf mpfr-2.4.2.tar.bz2
[root@Server gcc_install]# cd mpfr-2.4.2
[root@Server mpfr-2.4.2]# ./configure&&--with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib
[root@Server mpfr-2.4.2]# make
[root@Server mpfr-2.4.2]# make check
如果出现如下信息
====================
All 156 tests passed
====================
make[2]: Leaving directory `/ tmp/mpfr-2.4.2/tests'
make[1]: Leaving directory `/ tmp/mpfr-2.4.2/tests'
make[1]: Entering directory `/tmp/mpfr-2.4.2'
make[1]: Nothing to be done for `check-am'.
make[1]: Leaving directory `/ tmp/mpfr-2.4.2
说明编译成功了.
接下来安装
[root@Server mpfr-2.4.2]# make install
3、&&安装 MPC
[root@Server mpfr-2.4.2] cd ..
[root@Server gcc_install]# tar zxvf mpc-0.8.1.tar.gz
[root@Server gcc_install]# cd mpc-0.8.1
[root@Server mpc-0.8.1]# vi ./src/acos.c +192
注释掉第192行(# :rnd_im == GMP_RNDA ? GMP_RNDZ)即在该行前面加“#”
[root@Server mpc-0.8.1]# ./configure --with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib --with-mpfr-include=/usr/local/include& & --with-mpfr-lib=/usr/local/lib
[root@Server mpc-0.8.1]# make
[root@Server mpc-0.8.1]# make check (这个时候可能会有错误,但是这个没有关系,可以跳过!)
[root@Server mpc-0.8.1]# make install
二、安装gcc 4.7.0
1、配置gmp和mpfr的库文件路径, 在.bash_profile(一般在/root 目录下)配置 LD_LIBRARY_PATH,把 GMP 与 MPFR对应的 lib 配置上.
[root@Server mpc-0.8.1]# cd
[root@Server ~]# vi .bash_profile&&
export C_INCLUDE_PATH=/usr/local/include:$C_INCLUDE_PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
wq保存退出。
重启terminal生效或者使用&&source& &/root/.bash_profile
[root@Server ~]# source .bash_profile
2、安装gcc
[root@Server ~]# cd /home/phamlab/software/gcc_install/
[root@Server gcc_install]# tar zxvf gcc-4.7.0.tar.gz
[root@Server gcc_install]# cd gcc-4.7.0
[root@Server gcc_install]# mkdir gcc_temp
[root@Server gcc_install]# cd gcc_temp
[root@Server gcc_temp]# ../configure --prefix=/usr& &--with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local
[root@Server gcc_temp]# make
[root@Server gcc_temp]# make install
下面是gcc的make编译错误信息:
gcc -c&&-DIN_GCC_FRONTEND -g -fkeep-inline-functions -DIN_GCC& &-W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -Wold-style-definition -Wc++-compat -fno-common&&-DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/local/include -I/usr/local/include -I/usr/local/include&&-I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/bid -I../libdecnumber& & ../../gcc/c-lang.c -o c-lang.o
在包含自 ./tm.h:19 的文件中,
& && && && && &&&从 ../../gcc/c-lang.c:26:
./options.h:3729:2: 错误:#error too many masks for ix86_isa_flags
In file included from ../../gcc/input.h:25,
& && && && && &&&from ../../gcc/tree.h:27,
& && && && && &&&from ../../gcc/c-lang.c:27:
../../gcc/../libcpp/include/line-map.h:208: 错误:‘CHAR_BIT’ 未声明 (不在函数内)
../../gcc/../libcpp/include/line-map.h:208: 错误:位段 ‘reason’ 的宽度不是一个整数常量
../../gcc/../libcpp/include/line-map.h:208: 警告:‘reason’ 比其类型的值要窄
在包含自 ../../gcc/tree.h:32 的文件中,
& && && && && &&&从 ../../gcc/c-lang.c:27:
../../gcc/real.h:87:5: 错误:#if 中用零做除数
../../gcc/real.h:87:5: 错误:#if 中用零做除数
../../gcc/real.h:90:6: 错误:#if 中用零做除数
../../gcc/real.h:90:6: 错误:#if 中用零做除数
../../gcc/real.h:93:7: 错误:#if 中用零做除数
../../gcc/real.h:93:7: 错误:#if 中用零做除数
../../gcc/real.h:96:8: 错误:#if 中用零做除数
../../gcc/real.h:96:8: 错误:#if 中用零做除数
../../gcc/real.h:99:9: 错误:#if 中用零做除数
../../gcc/real.h:99:9: 错误:#if 中用零做除数
../../gcc/real.h:102:10: 错误:#if 中用零做除数
../../gcc/real.h:102:10: 错误:#if 中用零做除数
../../gcc/real.h:105:9: 错误:#error &REAL_WIDTH & 6 not supported&
In file included from ../../gcc/c-family/c-common.h:26,
& && && && && &&&from ../../gcc/c-tree.h:25,
& && && && && &&&from ../../gcc/c-lang.c:28:
../../gcc/../libcpp/include/cpplib.h:225: 错误:位段 ‘type’ 的宽度不是一个整数常量
../../gcc/../libcpp/include/cpplib.h:225: 警告:‘type’ 比其类型的值要窄
在包含自 ../../gcc/c-family/c-common.h:26 的文件中,
& && && && && &&&从 ../../gcc/c-tree.h:25,
& && && && && &&&从 ../../gcc/c-lang.c:28:
../../gcc/../libcpp/include/cpplib.h:267:3: 错误:#error &Cannot find a least-32-bit signed integer type&
../../gcc/../libcpp/include/cpplib.h:269: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cppchar_t’
../../gcc/../libcpp/include/cpplib.h:270: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cppchar_signed_t’
../../gcc/../libcpp/include/cpplib.h:768: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cpp_interpret_charconst’
../../gcc/../libcpp/include/cpplib.h:779: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cpp_host_to_exec_charset’
../../gcc/../libcpp/include/cpplib.h:954: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cpp_parse_escape’
make[3]: *** [c-lang.o] 错误 1
make[3]: Leaving directory `/root/OpenCV_install/gcc_update/gcc-4.7.0/gcc_temp/gcc'
make[2]: *** [all-stage1-gcc] 错误 2
make[2]: Leaving directory `/root/OpenCV_install/gcc_update/gcc-4.7.0/gcc_temp'
make[1]: *** [stage1-bubble] 错误 2
make[1]: Leaving directory `/root/OpenCV_install/gcc_update/gcc-4.7.0/gcc_temp'
make: *** [all] 错误 2
请问各位高手,升级gcc4.1.2 到gcc4.7.0时,make出现如上错误。该如何解决?我已经纠结两天了,问题还是没有解决。在其他论坛看到过同样的错误,但是都没有人解答。希望能及时得到大家的帮助。非常感谢!
助理工程师
RHEL5.4不错 我回家看看WIN98的系统安装盘还在不在了
我安装了 isl\ppl\cloog\cloog-ppl,还是出现同样的错误啊!大家能帮忙分析一下吗?我这个系统是裸的,是不是还缺少什么工具包啊?Linux中对GCC源文件进行配置时,出现如下错误:no acceptable cc found in $PATH,该如何是好?_百度知道
Linux中对GCC源文件进行配置时,出现如下错误:no acceptable cc found in $PATH,该如何是好?
具体该怎么整呢!!,越具体越好,谢谢了,越详细越好如果是未安装gcc编译器的话,如果是其他的话,怎么样才能安装成功呢,如果是环境变量的话,怎么样配置呢
我有更好的答案
你是什么系统如果是redhat或是fedora的话,直接yum install gcc如果是debian ubuntu mint的话,直接apt-get install gccyum的源也需要配置一下,可以上网搜一下就行。
这是怎么个情况啊
你要先配置yum的源啊,上网搜搜看方法。百度里敲“redhat 配置 yum源”
采纳率:49%
看来是环境变量没有配置好 你修改下path变量试试
具体方法 百度搜 linux下查看和添加PATH环境变量
o(︶︿︶)o 唉,恕我愚笨,您能具体问题具体分析具体解决一下吗,我是怎么设置也不成功啊~~~
为您推荐:
其他类似问题
gcc的相关知识
换一换
回答问题,赢新手礼包linux 下make install出错_百度知道
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。
linux 下make install出错
[root@yeez2 mpich-3.0.4]# make installmake: *** No rule to make target `install'.
我有更好的答案求助知道网友
先看看是不是./configure的时候报什么错误。这个明显是上一步出错,没有生成make文件。
./configure有好多都是 no
好多都是no说明有很多的依赖包没有安装,比如常用的gcc gcc-c++ automake 等等。
那就是这个软件不支持make install操作!你可以找到readme,这里面会有详细的安装说明!【并不是所有的软件都可以make install,希望可以帮到你!】
makefile里面没有install的命令
谁教你用make install的?至少先看一下README, INSTALL之类的文档,再照说明操作吧
本回答被提问者和网友采纳
1条折叠回答
为您推荐:
其他类似问题
linux的相关知识
换一换
回答问题,赢新手礼包gcc在出现错误的时候停止编译
时间: 21:17:00
&&&& 阅读:160
&&&& 评论:
&&&& 收藏:0
标签:&&&&&&&&&有时候我们编译一个大的项目的时候,会出现很多错误使得屏幕堆满了很多无用的信息。一般情况下我们需要找到首次出现错误的地方,在gcc中添加编译选项可以使编译停止在第一次出现错误的地方:
$ gcc -Wfatal-errors foo.c
$ g++ -Wfatal-errors foo.cpp
$ g++ -fmax-errors=N foo.cpp
如果使用cmake构建的项目:
add_definitions(
-Wfatal-errors
打开警告信息:
$ g++ -Wall foo.cpp
警告信息当做错误处理:
$ g++ -Werror foo.cpp
标签:&&&&&&&&&原文:http://blog.csdn.net/gwgame/article/details/
教程昨日排行
&&国之画&&&& &&&&&&
&& &&&&&&&&&&&&&&
鲁ICP备号-4
打开技术之扣,分享程序人生!Linux centos6.5系统下升级gcc4.8.2时,编译gcc时出现错误,请求帮助_百度知道
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。
Linux centos6.5系统下升级gcc4.8.2时,编译gcc时出现错误,请求帮助
参考的教程是 /c/discreteness/956550.html
configure: error: C++ compiler missing or inoperational
make[2]: *** [configure-stage1-libcpp] Error 1
make[2]: Leaving directory `/home/lijiang/vm/gcc-4.8.2'
我有更好的答案求助知道网友
把C++也装上才行:yum install gcc-g++
我在root下yum install gcc-g++出现:Setting up Install ProcessNo package gcc-g++ available.Error: Nothing to do
把YUM源设置好啊,能联网就设到网上,否则设到光盘,用系统安装光盘装
说你没有GCC自己编译GCC要使用到GCC,至于最开始的Gcc是怎么来的,可以参考Linux from scratch,思路就是用YACC和Bintutils编译GCC,然后再用得到的GCC重新编译一遍得到第二版的GCC你不用那么麻烦的,直接yum install gcc装个Gcc就好了
本回答被提问者和网友采纳
1条折叠回答
为您推荐:
其他类似问题
gcc的相关知识
换一换
回答问题,赢新手礼包

我要回帖

更多关于 gcc install 的文章

 

随机推荐