【亲测】<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 ...
随机推荐
- Django之模型层-多表操作
多表操作 数据库表关系 一对多:两个表之间的关系一旦确定为一对多,必须在数据多的表中创建关联字段 多对多:两个表之间的关系一定确定为多对多,必须创建第三张表(关联表) 一对一:一旦两个表之间的关系确定 ...
- TFLearn 与 Tensorflow 一起使用
好用的不是一点点..=-=.. import tensorflow as tf import tflearn import tflearn.datasets.mnist as mnist # Usin ...
- mac上不了网
不知怎么回事勾选了socks代理导致ping的通但打不开网页软件登不了
- [LeetCode&Python] Problem 13. Roman to Integer
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 ...
- 纯C:AES256
尼玛的WordPress把格式全搞乱了 aes256.h #ifndef _AES256_H_ #define _AES256_H_ #include <stdio.h> #include ...
- HDU - 5157 :Harry and magic string (回文树,求多少对不相交的回文串)
Sample Input aca aaaa Sample Output 3 15 题意: 多组输入,每次给定字符串S(|S|<1e5),求多少对不相交的回文串. 思路:可以用回文树求出以每个位置 ...
- jquery实现拖拽进度条并显示百分比的特效
#box{position: relative; width: 200px; height: 50px; border: 1px solid #eee; margin: 50px auto 0;} # ...
- 实验吧—密码学——WP之 杯酒人生
首先我们研究题目 1.这是古典密码 2.喵星人要发送一段密码 3.加密过的秘钥“HTRUZYJW” 4.秘钥加密前是一个单词 我们先解决这个秘钥,用凯撒解密 而我们知道,在古典密码里,有秘钥的加密方式 ...
- Go Example--通道遍历
package main import ( "fmt" ) func main() { queue := make(chan string, 2) queue <- &quo ...
- 【shell编程】之基础知识-文件包含
和其他语言一样,Shell 也可以包含外部脚本.这样可以很方便的封装一些公用的代码作为一个独立的文件. Shell 文件包含的语法格式如下: . filename # 注意点号(.)和文件名中间有一空 ...