添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
帅气的闹钟  ·  搜索结果·  9 月前    · 
冷冷的夕阳  ·  就业冲锋号 | ...·  1 年前    · 
严肃的牙膏  ·  GENERATE_SERIES ...·  2 年前    · 
[root@hugo hugo]# yum install g++
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.ustc.edu.cn
 * extras: centos.ustc.edu.cn
 * updates: centos.ustc.edu.cn
Setting up Install Process
No package g++ available.
Error: Nothing to do

因为在centos下g++安装包名字叫做:gcc-c++

所以应该输入 yum install gcc-c++,即可。

[root@hugo hugo]# yum -y install gcc-c++
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: centos.ustc.edu.cn
 * extras: centos.ustc.edu.cn
 * updates: centos.ustc.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.4.7-3.el6 will be installed
--> Processing Dependency: libstdc++-devel = 4.4.7-3.el6 for package: gcc-c++-4.4.7-3.el6.x86_64
--> Running transaction check
---> Package libstdc++-devel.x86_64 0:4.4.7-3.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
 Package                 Arch           Version              Repository    Size
================================================================================
Installing:
 gcc-c++                 x86_64         4.4.7-3.el6          base         4.7 M
Installing for dependencies:
 libstdc++-devel         x86_64         4.4.7-3.el6          base         1.6 M
Transaction Summary
================================================================================
Install       2 Package(s)
Total download size: 6.3 M
Installed size: 20 M
Downloading Packages:
(1/2): gcc-c++-4.4.7-3.el6.x86_64.rpm                    | 4.7 MB     00:27     
(2/2): libstdc++-devel-4.4.7-3.el6.x86_64.rpm            | 1.6 MB     00:08     
--------------------------------------------------------------------------------
Total                                           178 kB/s | 6.3 MB     00:36