编译gcc报错make[3]: Leaving directory `/usr/local/src/gcc-7.4.0/build/gcc' make[2]: *** [all-stage1-gcc] Error 2 处理
因业务需要安装7.4高版本gcc时报错:
configure: error: in `/usr/local/src/gcc-7.4.0/build/gcc':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make[3]: Leaving directory `/usr/local/src/gcc-7.4.0/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/usr/local/src/gcc-7.4.0/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/usr/local/src/gcc-7.4.0/build'
make: *** [all] Error 2
解决:
yum install -y glibc-headers gcc-c++ #参考链接https://www.cnblogs.com/niocai/archive/2011/11/04/2236458.html
知识点扩展:
在网上寻找解决方案时碰到一些人说是因内存不足需要添加swap分区来解决,未实际验证,这里给出添加swap分区的方法
添加命令
SWAP=/tmp/swap
dd if=/dev/zero of=$SWAP bs=1M count=500 #500为swap分区大小
mkswap $SWAP
swapon $SWAP #启用swap
当发现swap分区不够用,想继续加大时,需要先关闭正在使用的swap分区,然后重新分配
swapoff /tmp/swap 或者swapoff -a这两个命令均可关闭swap分区
注意:如果不关闭现有swap分区但想继续扩容swap分区时,当执行dd命令时会报如下错:
dd: failed to open ‘/tmp/swap’: Text file busy
另外根据需要可以将swap写入/etc/fstab使其永久生效
/tmp/swap swap swap defaults 0 0
编译gcc报错make[3]: Leaving directory `/usr/local/src/gcc-7.4.0/build/gcc' make[2]: *** [all-stage1-gcc] Error 2 处理的更多相关文章
- 编译php5.4的时候出现错误----configure: error: in `/usr/local/src/php540/php-5.4.0':
错误如下:checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep - ...
- linux,安装软件报错cannot create regular file '/usr/local/man/man1': No such file or directory
make install时报错,如下 install: cannot create regular file '/usr/local/man/man1': No such file or direct ...
- 启动elk中elasticsearch服务报错which: no java in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin)
解决办法: vi /etc/sysconfig/elasticsearch JAVA_HOME=/usr/local/java sudo systemctl restart elasticsearch ...
- CentOS6.6 编译Redis报错:"Newer version of jemalloc required"
一.前言 不同系统同一个问题,可能解决方法不一样,也可能会遇到不同的问题,所以具体情况具体分析,我的系统是Centos6.6, 查看系统命令 cat /etc/issue 二.安装redis后编译报 ...
- 源码编译apache报错的解决方法
源码编译apache报错的解决方法 问题介绍 在源码编译安装httpd时,./configure执行无错误,到make时就报错,在网络上搜索了很多文章,很多方法如换apr-util的低版本并不能很 ...
- LINUX下基于NVIDIA HPC SDK 的 VASP6.3.x编译安装报错整理
关于gcc 用旧版本安装NVIDIA HPC SDK再编译会报错: "/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/move.h" ...
- 编译PHP 报错:node.c: In function dom_canonicalization
编译PHP 报错:node.c: In function dom_canonicalization /opt/php-5.2.17/ext/dom/node.c:1953: error: deref ...
- idea中编译项目报错 java: javacTask: 源版本 1.8 需要目标版本 1.8
问题如上面所叙: > idea中编译项目报错 java: javacTask: 源版本 1.8 需要目标版本 1.8 解决方案: > Setting->Compiler->Ja ...
- PHP编译安装报错:configure: error: mcrypt.h not found. Please reinstall libmcrypt
我是在CentOS6.5安装php5.5.28这个版本,PHP编译代码如下: ./configure --prefix=/usr/local/php --with-config-file-path=/ ...
随机推荐
- 14)载入png图片
1)之前在窗口中载入图片 一般都是bmp的 但是 我想从网上下一些图片,这些图片可能是png的 2)那么就有了下面的操作 3)png图片可以直接做成透明的. 4)首先是创建窗口的基本代码: #i ...
- [原]调试实战——使用windbg调试DLL卸载时的死锁
原调试debugwindbg死锁deadlock 前言 最近我们的程序在退出时会卡住,调查发现是在卸载dll时死锁了.大概流程是这样的:我们的dll在加载的时候会创建一个工作线程,在卸载的时候,会设置 ...
- 题解 P6004 【[USACO20JAN]Wormhole Sort S】
这题真的是非常标准的模板题啊 看到连最少的边,第一时间会想到 \(kruskal\) .这道题的难点其实就一个:你要注意到连边权最大的边使整个图联通 为什么:题意是第i个点想走到 \(pos[i]\) ...
- drf序列化单改-整改-局部改-群改接口的实现
整体单改 路由层.模型层.序列化层不需要做修改,只需要处理视图层:views.py """ 1) 单整体改,说明前台要提供修改的数据,那么数据就需要校验,校验的数据应该在 ...
- ant design for vue 刷新页面,根据当前路由选中相应菜单
<a-menu theme="dark" mode="horizontal" class="menu__a" @select=&quo ...
- Kali 时间修改
前言 装了新版本的 Kali 之后发现默认的时间和实际的时间不太一样 查了资料说 linux 的默认时间是格林威治时间,即从本初子午线为0时区 以下是 kali 修改时间的方法 1.tzselect ...
- Java依据集合元素的属性,集合相减
两种方法:1.集合相减可以使用阿帕奇的一个ListUtils.subtract(list1,list2)方法,这种方法实现必须重写集合中对象的属性的hashCode和equals方法,集合相减判断的会 ...
- mysql数据库5.6.45安装后的配置(离线安装包版)
二.windows10下的配置 (1) 环境变量配置 打开控制面板=>系统和安全=>系统=>高级系统设置,选择环境变量,在系统变量中找到path,编辑该选项. 第一行是oracle数 ...
- windows系统下的渗透测试神器 -pentestbox
Pentestbox介绍 PentestBox官网:https://pentestbox.org/zh/ 这是一个运行在windows环境下的终端,集成了绝大部分渗透测试所需要的环境 如python2 ...
- ElasticSearch 分组查询
curl -XPOST 'localhost:9200/bank/_search?pretty' -d ' { "size": 0, "aggs": { &qu ...