centos7 更新,GCCconfigure: error: error verifying int64_t uses long long

centos7系统更新gcc,根据https://blog.csdn.net/qq_33047753/article/details/102805075,所写更新,发现自己以前的步骤走不通了,这就让我很奇怪,出现下面的错误:

checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for long long int... yes
checking for intmax_t... yes
checking for intptr_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for unsigned long long int... yes
checking for uintmax_t... yes
checking for uintptr_t... yes
checking for int64_t underlying type... long long
configure: error: error verifying int64_t uses long long
make[2]: *** [configure-stage1-gcc] Error 1
make[2]: Leaving directory `/home/sjarvis/dev/gcc/srcdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/sjarvis/dev/gcc/srcdir'
make: *** [all] Error 2

找了一下博主有相同错误的解决方法,

https://blog.csdn.net/u012509728/article/details/49923995,该博主说是因为没有装g++ 导致,安装g++可解决

但是我发现我运行whereis g++ 是安装上了,而且使用yum install 也显示是最新的,没办法了,所以该方法不适合我的了,但是查了几个相似的问题,都说是g++没有安装上,我就运行 g++ -v,发现好像是没有装上,因为以前就是用yum install g++安装的,没有,考虑是否安装上,后来我就想要不就把安装的目录放入环境变量里吧,因为我把gcc的放进去了。

运行

vim ~/.bashrc

export PATH:/usr/bin/g++:$PATH

:x退出后,运行source ~/.bashrc 激活

然后运行 g++,又报错

bash: g++: Permission denied

所以给它权限,运行 chmod +x g++,再次运行g++,出现

g++: fatal error: no input files
compilation terminated.

哎·····,本人菜鸟就是菜鸟啊,在网上查了几个,我也没有查到什么结果,后来我看到该博主(https://www.zybuluo.com/comzyh/note/4709)发的,上面写的是,运行上面的结果就是安装上了,我滴天····,我搞了半天原来是安装好了,我还是不放心,又运行一下编译gcc,发现果然成功了,哎·····,这里就是给自己一个记录吧,也给大家借鉴一下,至于能不能解决大家发现的问题,我就不知道了,我是可以运行了。

 

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值