红联Linux门户
Linux帮助

Centos安装g++错误:No package g++ available

发布时间:2016-03-10 10:57:11来源:linux网站作者:tina_tian1

错误命令:

[root@localhost cswapserver]# yum install g++
已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.nwsuaf.edu.cn
* updates: mirrors.163.com
base   | 3.7 kB     00:00
docker-main-repo    | 2.9 kB     00:00
extras   | 3.4 kB     00:00
mysql-connectors-community   | 2.5 kB     00:00
mysql-tools-community   | 2.5 kB     00:00
mysql56-community   | 2.5 kB     00:00
updates    | 3.4 kB     00:00
No package g++ available.

错误:无须任何处理。


正确命令:
[root@localhost cswapserver]# yum install gcc-c++
已加载插件:fastestmirror, refresh-packagekit, security
设置安装进程:
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* extras: mirrors.nwsuaf.edu.cn
* updates: mirrors.163.com

解决依赖关系:
--> 执行事务检查
---> Package gcc-c++.x86_64 0:4.4.7-16.el6 will be 安装
--> 处理依赖关系 libstdc++-devel = 4.4.7-16.el6,它被软件包 gcc-c++-4.4.7-16.el6.x86_64 需要
--> 执行事务检查
---> Package libstdc++-devel.x86_64 0:4.4.7-16.el6 will be 安装
--> 完成依赖关系计算


依赖关系解决:
软件包  架构  版本  仓库  大小

正在安装:
gcc-c++   x86_64   4.4.7-16.el6   base   4.7 M
为依赖而安装:
libstdc++-devel   x86_64   4.4.7-16.el6   base   1.6 M


事务概要

Install       2 Package(s)


总下载量:6.3 M
Installed size: 20 M
确定吗?[y/N]:y
下载软件包:
(1/2): gcc-c++-4.4.7-16.el6.x86_64.rpm   | 4.7 MB     00:09
(2/2): libstdc++-devel-4.4.7-16.el6.x86_64.rpm   | 1.6 MB     00:03

总计   497 kB/s | 6.3 MB     00:13
运行 rpm_check_debug
执行事务测试
事务测试成功
执行事务
正在安装   : libstdc++-devel-4.4.7-16.el6.x86_64   1/2
正在安装   : gcc-c++-4.4.7-16.el6.x86_64   2/2
Verifying  : libstdc++-devel-4.4.7-16.el6.x86_64   1/2
Verifying  : gcc-c++-4.4.7-16.el6.x86_64   2/2

已安装:
gcc-c++.x86_64 0:4.4.7-16.el6

作为依赖被安装:
libstdc++-devel.x86_64 0:4.4.7-16.el6

完毕!
[root@localhost cswapserver]#


本文永久更新地址:http://www.linuxdiyf.com/linux/18782.html