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

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!

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

  1. 解决g++:command not found(centos7.0)

    问题背景,因为装了虚拟机,系统为centos7.0,由于是纯净版,没有gcc,使用命令yum install gcc安装了gcc,但是没安装g++,导致g++:command not found问题. ...

  2. 【亲测】<g++/gcc>CentOS下g++: command not found问题的解决(c++环境安装)

    CentOS下g++: command not found问题的解决 2017年02月27日 18:09:06 阅读数:5174 标签: centosgcc 更多 个人分类: 问题分析   版权声明: ...

  3. Linux & terminal color & command line color

    Linux & terminal color & command line color how to change Linux terminal color https://askub ...

  4. [转]Linux下g++编译与使用静态库(.a)和动态库(.os) (+修正与解释)

    在windows环境下,我们通常在IDE如VS的工程中开发C++项目,对于生成和使用静态库(*.lib)与动态库(*.dll)可能都已经比较熟悉,但是,在linux环境下,则是另一套模式,对应的静态库 ...

  5. linux shell basic command

    Learning basic Linux commands Command Description $ ls This command is used to check the contents of ...

  6. Linux环境g++编译TinyXML动态库

    除了CMarkup,tinyxml也是C/C++下解析XML很好的工具.在linux下用g++编译tinyxml的步骤如下(tinyxml版本2.6.2): 进入tinyxml解压目录,用文本编辑器打 ...

  7. Linux sort -g 的困惑

    sort命令是帮我们依据不同的数据类型进行排序,排序的效率很高,因此也是很常用的命令. sort参考及说明:https://www.gnu.org/software/coreutils/manual/ ...

  8. [问题解决]linux sudo xxx:command not found

    题外话 软件的安装在linux下主要分为两种.一种是通过包管理器例如ubuntu的apt-get xxx,另一种是自己手动安装.通过包管理器安装的,基本开箱即用,无需配置,但是存在一个问题,有时候无法 ...

  9. Linux renew ip command

    $ sudo dhclient -r    //release ip 释放IP$ sudo dhclient       //获取IP Now obtain fresh IP:$ sudo dhcli ...

随机推荐

  1. 使用Free Spire.XLS插入图表

    使用Free Spire.XLS插入图表 前言 最近在研究Office中间件,上网搜索了下,比较出名的有两个:Aspose和Spire,两者功能齐全,对Office的支持趋近完善,但售价不菲.仔细搜索 ...

  2. 如何 判断 设备 是否 连接 上 了 wifi

    这里,我给出一个函数 public boolean sale_connect_check(WifiConfiguration wcg,Context context) { boolean judge_ ...

  3. js实现可拖拽的div

    前言 下午忙里偷闲想写一个可拖拽的例子,留在脑海里一直都是三个事件mouseDown,mouseUp,mouseMove, 但从没有动手实践过,今天想起了自己实践了并学习了张鑫旭的demo实现. 学习 ...

  4. Vuforia unity开发摄像头问题

    Vuforia unity开发摄像头问题 项目一直在赶进度,写博的时间越来越少了~从事Unity开发也快两个月了,AR方向~ 使用的是高通家的SDK Vuforia...从工程融合一直到对unity和 ...

  5. Rafy 领域实体框架演示(3) - 快速使用 C/S 架构部署

    本系列演示如何使用 Rafy 领域实体框架快速转换一个传统的三层应用程序,并展示转换完成后,Rafy 带来的新功能. <福利到!Rafy(原OEA)领域实体框架 2.22.2067 发布!> ...

  6. Nancy之区域和分部视图的使用

    一.前言 在MVC中,区域(Area)和分部视图(PartialView)应该是我们用的十分频繁的两个东西 今天我们就在Nancy中,把这两个东西简单的用起来!   二.简单使用之区域 区域,无论是对 ...

  7. C#冒泡排序法

    基本原理 比较两个相邻的数的大小,每次比较完后把最大的数放到本轮的末尾.假设有数组: 258,445,131,97,22,36,17,38,28,28,第一轮:258和445比较,位置不用交换.第二轮 ...

  8. 【C#进阶系列】24 运行时序列化

    序列化是将对象或者对象图(一堆有包含关系的对象)转换成字节流的过程.而反序列化就是将字节流转为对象或对象图. 主要用于保存.传递数据,使得数据更易于加密和压缩. .NET内建了出色的序列化和反序列化支 ...

  9. linux 共享内存 shmat,shmget,shmdt,shmctl

    shmget int shmget(key_t key, size_t size, int flag);//开辟一段共享内存 key_t key :标识符的规则() size_t size :共享内存 ...

  10. android视频播放器

    RTSP(Real Time Streaming Protocol),RFC2326,实时流传输协议,是TCP/IP协议体系中的一个应用层协议,由哥伦比亚大学.网景和RealNetworks公司提交的 ...