Centos上运行g++c++:command not found



Centos上运行g++c++:command not found

[root@localhost bin]# g++
-bash: g++: command not found
[root@localhost bin]# whereis g++
g++:
[root@localhost bin]# whereis c++
c++:
[root@localhost bin]#
[root@localhost bin]#
[root@localhost bin]# g++
-bash: g++: command not found
[root@localhost bin]# yum install gcc gcc-c++
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * extras: mirror.bit.edu.cn
 * updates: mirrors.skyshe.cn
Setting up Install Process
Package gcc-4.4.7-11.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.4.7-11.el6 will be installed
--> Processing Dependency: libstdc++-devel = 4.4.7-11.el6 for package: gcc-c++-4.4.7-11.el6.x86_64
--> Processing Dependency: libstdc++ = 4.4.7-11.el6 for package: gcc-c++-4.4.7-11.el6.x86_64
--> Running transaction check
---> Package libstdc++.x86_64 0:4.4.7-4.el6 will be updated
---> Package libstdc++.x86_64 0:4.4.7-11.el6 will be an update
---> Package libstdc++-devel.x86_64 0:4.4.7-11.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================
 Package                    Arch              Version                   Repository       Size
==============================================================================================
Installing:
 gcc-c++                    x86_64            4.4.7-11.el6              base            4.7 M
Installing for dependencies:
 libstdc++-devel            x86_64            4.4.7-11.el6              base            1.6 M
Updating for dependencies:
 libstdc++                  x86_64            4.4.7-11.el6              base            294 k

Transaction Summary
==============================================================================================
Install       2 Package(s)
Upgrade       1 Package(s)

Total download size: 6.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): gcc-c++-4.4.7-11.el6.x86_64.rpm                                 | 4.7 MB     00:13    
(2/3): libstdc++-4.4.7-11.el6.x86_64.rpm                               | 294 kB     00:00    
(3/3): libstdc++-devel-4.4.7-11.el6.x86_64.rpm                         | 1.6 MB     00:04    
----------------------------------------------------------------------------------------------
Total                                                         340 kB/s | 6.6 MB     00:19    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : libstdc++-4.4.7-11.el6.x86_64                                              1/4
  Installing : libstdc++-devel-4.4.7-11.el6.x86_64                                        2/4
  Installing : gcc-c++-4.4.7-11.el6.x86_64                                                3/4
  Cleanup    : libstdc++-4.4.7-4.el6.x86_64                                               4/4
  Verifying  : libstdc++-devel-4.4.7-11.el6.x86_64                                        1/4
  Verifying  : libstdc++-4.4.7-11.el6.x86_64                                              2/4
  Verifying  : gcc-c++-4.4.7-11.el6.x86_64                                                3/4
  Verifying  : libstdc++-4.4.7-4.el6.x86_64                                               4/4

Installed:
  gcc-c++.x86_64 0:4.4.7-11.el6                                                              

Dependency Installed:
  libstdc++-devel.x86_64 0:4.4.7-11.el6                                                      

Dependency Updated:
  libstdc++.x86_64 0:4.4.7-11.el6                                                            

Complete!
[root@localhost bin]# g++
g++: no input files
[root@localhost bin]#

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值