【亲测】<g++/gcc>CentOS下g++: command not found问题的解决(c++环境安装)
1. 问题的提出
在安装extundelete的过程中,发现在configure过程中,出错了,具体的错误信息如下:
- configure:2865: g++ --version >&5
- ./configure: line 2867: g++: command not found
- configure:2876: $? = 127
- configure:2865: g++ -v >&5
- ./configure: line 2867: g++: command not found
- configure:2876: $? = 127
- configure:2865: g++ -V >&5
- ./configure: line 2867: g++: command not found
- configure:2876: $? = 127
- configure:2865: g++ -qversion >&5
- ./configure: line 2867: g++: command not found
- configure:2876: $? = 127
- configure:2896: checking whether the C++ compiler works
- configure:2918: g++ conftest.cpp >&5
- ./configure: line 2920: g++: command not found
- configure:2922: $? = 127
- configure:2960: result: no
- configure: failed program was:
- | /* confdefs.h */
- | #define PACKAGE_NAME "extundelete"
- | #define PACKAGE_TARNAME "extundelete"
- | #define PACKAGE_VERSION "0.2.4"
- | #define PACKAGE_STRING "extundelete 0.2.4"
- | #define PACKAGE_BUGREPORT "extundelete.sourceforge.net"
- | #define PACKAGE_URL ""
- | #define PACKAGE "extundelete"
- | #define VERSION "0.2.4"
- | /* end confdefs.h. */
- |
- | int
- | main ()
- | {
- |
- | ;
- | return 0;
- | }
- configure:2965: error: in `/root/extundelete-0.2.4':
- configure:2967: error: C++ compiler cannot create executables
- See `config.log' for more details
经过分析,发现其中的关键错误信息是:
g++: command not found
g++马上就脑补为gc++的编译器是不是没有安装呀? 估计是的,按图索骥,安装看看。
2. 安装以及解决
由于本人使用的OS环境为centos, 其默认的包管理工具为yum, 故按照依赖包:
- yum -y update gcc
- yum -y install gcc+ gcc-c++
执行上述命令之后,可以返现gcc相关命令都按照成功了,故问题解决。
3. 总结分析
默认情况下,centos并未按照gcc相关的编译命令,如果在安装软件之时,有时候需要从源代码编译开始,进行安装;此时就需要gcc的命令支持。
【亲测】<g++/gcc>CentOS下g++: command not found问题的解决(c++环境安装)的更多相关文章
- Centos下忘记mysql的root密码的解决方法
Centos下忘记mysql的root密码的解决方法 一:(停掉正在运行的mysql) [root@NetDakVPS ~]# service mysql stop 二:使用 “--skip-gran ...
- centos下wget: command not found的解决方法
今天给服务器安装新LNMP环境时,wget 时提示 -bash:wget command not found,很明显没有安装wget软件包.一般linux最小化安装时,wget不会默认被安装,这里是C ...
- 一起学ASP.NET Core 2.0学习笔记(一): CentOS下 .net core2 sdk nginx、supervisor、mysql环境搭建
作为.neter,看到.net core 2.0的正式发布,心里是有点小激动的,迫不及待的体验了一把,发现速度确实是快了很多,其中也遇到一些小问题,所以整理了一些学习笔记: 阅读目录 环境说明 安装C ...
- centos下svn的主要常用命令(解决商城系统添加的文件无法自动更新至svn服务器)
问题描述: 在商城中通过网页上传的png文件无法自动添加到版本库中. 查找过程: 通过程序分析,增加的主要是数据文件,主要分布在data目录中. svn list /home/ggg --depth= ...
- 【亲测有效】Centos安装完成docker后启动docker报错docker: unrecognized service的两种解决方案
今天在学习Docker的时候 使用yum install docker安装完后启动不了,报错如下: [root@Sakura ~]# service docker start docker: unre ...
- [亲测!超级简单] Centos 安装Python3.6环境
配置好Python3.6和pip3安装EPEL和IUS软件源 yum install epel-release -y yum install https://centos7.iuscommunity. ...
- Centos下找不到eth0设备的解决方法
问题描述: ifconfig命令无法找到eth0设备,且/etc/sysconfig/network-scripts/中只有ifcfg-lo文件,而没有ifcfg-eth0. 临时解决方法一: 使用命 ...
- CENTOS下Python 升级后YUM无法使用的解决办法
Python有很多实用的工具,安装依赖python版本较高,升级Python后导致yum无法使用. 原因: 系统自带的yum依赖Python老版本,升级后不兼容 解决办法: 1. 列出所有版本,确定老 ...
- centos下MySQL Workbench连接时崩溃的解决方法
在centos6.5中使用MySQL Workbench 6.3.8链接数据库崩溃,如果是在终端使用命令“mysql-workbench”打开的话会有如下错误提示: /usr/libexec/mysq ...
随机推荐
- matlab 读取fig数据
单曲线: open('figname.fig');h_line=get(gca,'Children');%get line handlesxdata=get(h_line,'Xdata');ydata ...
- Go unitest
待测试: // add.go package util func Add(a int, b int) int { return a + b} 使用gotests工具,自动生成测试用例框架: https ...
- Git忽略文件权限
有时 git diff 执行显示文件内容没变化,但是git status却是一片姨妈红: 原因是文件的权限,被chmod变化了,这种变化也被 diff 识别出来了,git diff某个文件类似如下: ...
- [LeetCode&Python] Problem 530. Minimum Absolute Difference in BST
Given a binary search tree with non-negative values, find the minimum absolute difference between va ...
- 导出文件为excle
handleOutPut() { const searchData=this.state.searchData; let url = commonData.baseMerchantUrl + &quo ...
- Electron 快速入门
https://www.w3cschool.cn/electronmanual/p9al1qkx.html
- python 闭包和迭代器
一 函数名的运用:(函数名是一个变量,但它是一个特殊变量,与括号配合可以执行变量. (1) 函数名可以赋值给其他变量 def chi(): print("吃月饼") fn=chi ...
- java super的用法
通过用static来定义方法或成员,从某种程度上可以说它类似于C语言中的全局函数和全局变量. this&super这两个关键字的意义和用法. 在Java中,this通常指当前对象,super则 ...
- 【BZOJ3527】【ZJOI2014】力
"FFT还不是随手写?"我终于能说这样的话了இwஇ 原题: 给出n个数qi,给出Fj的定义如下: 令Ei=Fi/qi,求Ei. FFT嘛,直接推公式 然后就变成俩卷积了,FFT ...
- day 56 jQuery学习
1.补充:each 描述:一个通用的迭代函数,它可以用来无缝迭代对象和数组.数组和类似数组的对象通过一个长度属性(如一个函数的参数对象)来迭代数字索引,从0到length - 1.其他对象通过其属性名 ...