Linux make: g++: Command not found

王朝学院·作者佚名  2016-05-26
窄屏简体版  字體: 小  |  中  |  大  |  超大  

linux make: g++: Command not found 2015-08-21 17:57 by 潇湘隐者, ... 阅读, ... 评论, 收藏, 编辑 Linux使用make命令时遇到“make: g++: Command not found”,这个主要是没有安装gcc-c++.x86_64,如下所示

[root@localhost nethogs]# make

g++ -g -Wall -Wextra -c packet.cpp

make: g++: Command not found

make: *** [packet.o] Error 127

root@localhost nethogs]# yum search "gcc-c++"

Loaded plugins: PRoduct-id, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

==================================== N/S Matched: gcc-c++ ====================================

gcc-c++.x86_64 : C++ support for GCC

Name and summary matches only, use "search all"for everything.

[root@localhost nethogs]# yum list "gcc-c++"

Loaded plugins: product-id, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

media | 4.1 kB 00:00 ...

Available Packages

gcc-c++.x86_64 4.4.7-11.el6 media

[root@localhost nethogs]# yum install "gcc-c++.x86_64"

Loaded plugins: product-id, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package gcc-c++.x86_64 0:4.4.7-11.el6 will be installed

--> Processing Dependency: gcc = 4.4.7-11.el6 for package: gcc-c++-4.4.7-11.el6.x86_64

--> Processing Dependency: libstdc++-devel = 4.4.7-11.el6 for package: gcc-c++-4.4.7-11.el6.x86_64

--> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++-4.4.7-11.el6.x86_64

--> Running transaction check

---> Package gcc.x86_64 0:4.4.7-11.el6 will be installed

--> Processing Dependency: cpp = 4.4.7-11.el6 for package: gcc-4.4.7-11.el6.x86_64

--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-11.el6.x86_64

---> Package libstdc++-devel.x86_64 0:4.4.7-11.el6 will be installed

---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed

--> Running transaction check

---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed

--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64

--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64

---> Package cpp.x86_64 0:4.4.7-11.el6 will be installed

--> Running transaction check

---> Package ppl.x86_64 0:0.10.2-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 media 4.7 M

Installing for dependencies:

cloog-ppl x86_64 0.15.7-1.2.el6 media 93 k

cpp x86_64 4.4.7-11.el6 media 3.7 M

gcc x86_64 4.4.7-11.el6 media 10 M

libstdc++-devel x86_64 4.4.7-11.el6 media 1.6 M

mpfr x86_64 2.4.1-6.el6 media 156 k

ppl x86_64 0.10.2-11.el6 media 1.3 M

Transaction Summary

==============================================================================================

Install 7 Package(s)

Total download size: 22 M

Installed size: 53 M

Is this ok [y/N]: y

Downloading Packages:

----------------------------------------------------------------------------------------------

Total 163 MB/s | 22 MB 00:00

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝網路 版權所有 導航