Linux make: g++: Command not found

Linux使用make命令时遇到“make: g++: Command not found”,这个主要是没有安装gcc-c++.x86_64,如下所示

 
[[email protected] nethogs]# make

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

make: g++: Command not found

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

[email protected] 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.

[[email protected] 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

[[email protected] 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

Running Transaction

  Installing : mpfr-2.4.1-6.el6.x86_64                                                    1/7 

  Installing : cpp-4.4.7-11.el6.x86_64                                                    2/7 

  Installing : ppl-0.10.2-11.el6.x86_64                                                   3/7 

  Installing : cloog-ppl-0.15.7-1.2.el6.x86_64                                            4/7 

  Installing : gcc-4.4.7-11.el6.x86_64                                                    5/7 

  Installing : libstdc++-devel-4.4.7-11.el6.x86_64                                        6/7 

  Installing : gcc-c++-4.4.7-11.el6.x86_64                                                7/7 

  Verifying  : gcc-4.4.7-11.el6.x86_64                                                    1/7 

  Verifying  : gcc-c++-4.4.7-11.el6.x86_64                                                2/7 

  Verifying  : mpfr-2.4.1-6.el6.x86_64                                                    3/7 

  Verifying  : libstdc++-devel-4.4.7-11.el6.x86_64                                        4/7 

  Verifying  : cpp-4.4.7-11.el6.x86_64                                                    5/7 

  Verifying  : ppl-0.10.2-11.el6.x86_64                                                   6/7 

  Verifying  : cloog-ppl-0.15.7-1.2.el6.x86_64                                            7/7 

 

Installed:

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

 

Dependency Installed:

  cloog-ppl.x86_64 0:0.15.7-1.2.el6     cpp.x86_64 0:4.4.7-11.el6 gcc.x86_64 0:4.4.7-11.el6 

  libstdc++-devel.x86_64 0:4.4.7-11.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6

 

Complete!

时间: 2024-10-24 22:02:18

Linux make: g++: Command not found的相关文章

Unix/Linux 'dirctory tree' command.

ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' It seems useful as a upgrade version of 'ls -R' Unix/Linux 'dirctory tree' command.

解决 linux -bash: telnet: command not found

输入命令telnet提示  linux -bash: telnet: command not found 解决方法: yum list telnet*   查看telnet相关的安装包 yum install telnet-server 安装telnet服务 yum install telnet.* 安装telnet客户端 然后运行telnet正常了

Centos6.5下虚拟机Linux 关于g++,gdb,ctags安装以及vim的配置

安装g++,gdb,ctags以及对vim的配置的目的: g++,gdb,ctags可以方便我们在Linux下编译程序,调试程序: 对vim进行配置的目的: 进行vim配置,可以让我们在后续敲代码更加方便.按F5可以直接编译并执行C.C++代码以及执行shell脚本:按"F8"可进行C.C++代码的调试:"Ctrl + A"为全选并复制快捷键,方便复制代码:按"F2"可以直接消除代码中的空行:F3"可列出当前目录文件,打开树状文件目录:

解决g++:command not found参考

在安装一些包的时候,遇到g++:command not found error,这是由于系统缺失相对应的包 工具/原料 CentOS64 方法/步骤 在发现该错误时,先在系统中确认是否缺失相对应的包: rpm -qa | grep "g++" 在确认系统未安装之后,查询可安装的相对应的功能的包: yum whatprovides "*/g++" 根据提供的包,选择适合系统的进行安装: yum install gcc-c++-4.4.7-4.el6.x86_64 4

在mac下idea的常用快捷键如下,下面的快捷键都亲自试用,并有一些和eclipse对比的说明 alt+f7查找在哪里使用 相当于eclipse的ctrl+shift+G command+alt+f7 这个是查找选中的字符在工程中出现的地方,可以不是方法变量类等,这个和上面的有区别的 command+F7可以查询当前元素在当前文件中的引用,然后按F3可以选择 ,功能基本同上 选中文本,按com

在mac下idea的常用快捷键如下,下面的快捷键都亲自试用,并有一些和eclipse对比的说明 alt+f7查找在哪里使用 相当于eclipse的ctrl+shift+G command+alt+f7 这个是查找选中的字符在工程中出现的地方,可以不是方法变量类等,这个和上面的有区别的 command+F7可以查询当前元素在当前文件中的引用,然后按F3可以选择 ,功能基本同上 选中文本,按command+shift+F7 ,高亮显示所有该文本,按Esc高亮消失.选中文本,按Alt+F3 ,逐个往下

Linux Bash Scripting - Command Chaining & Command lists

# this is to show you how to execute a series of commands in one strike. $ clear; cd /; ls -l; echo "You are in $PWD"; echo "Time to go back home"; cd ~; # use semi colon between each command. # There is also command lists, which is fo

libtool: line 990: g++: command not found的解决

apache 需要apr,编译中间的时候出现libtool: line 990: g++: command not found ,执行yum -y install gcc+ gcc-c++编译重新安装gcc就ok了

linux 升级g++ [错误:unrecognized command line option “-std=c++11”]

出现这个编译错误的原因在g++ gcc 版本不够高. 添加源(Ubuntu) 1 2 $ sudo add-apt-repository ppa:ubuntu-toolchain-r/test $ sudo apt-get update 安装4.8版本 ? 1 $ sudo apt-get install gcc-4.8 g++-4.8 查看本地安装版本 1 2 3 $ ls -lh /usr/bin/g++* 这里应该可以看到本机安装了4.6和4.8两个版本. 切换版本 1 2 3 4 5 s

Linux : ata: failed command: READ FPDMA QUEUED

Got "READ FPDMA QUEUED" errors from "dmesg" output on your Linux machine? ata2.00: status: { DRDY ERR } ata2.00: error: { UNC } ata2.00: failed command: READ FPDMA QUEUED ata2.00: cmd 60/28:70:28:19:89/00:00:6c:01:00/40 tag 14 ncq 2048