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. PHP过滤各种HTML标签

    $str=preg_replace("/<\s*img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i&q ...

  2. Deque的部分成员函数 解析,关于这个类,百度有很多解析,唯独没有其函数介绍

    函数 描述 c.assign(beg,end) c.assign(n,elem) 将[beg; end)区间中的数据赋值给c. 将n个elem的拷贝赋值给c. c.at(idx) 传回索引idx所指的 ...

  3. canvas实现拖动页面时显示窗口视频

    简介 当前主流的视频网站目前有不少新鲜好玩的功能,最明显的莫过于小视频的显示--当视频不在当前视口范围 时,会在右下角用一个小窗口来显示当前的视频,而且可以拖拽. 今晚心血来潮,起了动手试试的念头.我 ...

  4. ASP.NET程序开发范例宝典

    在整理资料时发现一些非常有用的资料源码尤其是初学者,大部分是平时用到的知识点,可以参考其实现方法,分享给大家学习,但请不要用于商业用途. 如果对你有用请多多推荐给其他人分享. 点击对应章节标题下载本章 ...

  5. 网页开发中文本编辑器UEditor的使用

    首先看一下效果图: 首先我们需要来认识下UEditor,它是由百度web前端研发部开发所见即所得富文本web编辑器,并且是基于BSD协议的开源产品,允许自由使用和修改,开源就意味着可以自己来定制这个编 ...

  6. rem、em、px的区别

    px 像素(Pixel).相对长度单位.像素px是相对于显示器屏幕分辨率而言的. 特点: 1. IE无法调整那些使用px作为单位的字体大小: 2. 国外的大部分网站能够调整的原因在于其使用了em或re ...

  7. 自己封装的一个LoadRes组件

    这两周一直太忙,没有好好处理上上上周遇到的一个让我加班到凌晨的问题,这个问题是判断flash的加载. 之前的思路是让flash的人在制作flash的时候,加入了一个回调方法,该方法再会回调我页面的方法 ...

  8. Win10 UWP系列:更新UWP时注意的问题——TargetDeviceFamily

    前几天把CurrencyExchanger提交到微软参加Master认证,结果没有通过,反馈了一些错误,看来微软检查还是比较仔细的. 错误主要有: Visual feedback helps user ...

  9. 基于CkEditor实现.net在线开发之路(3)常用From表单控件介绍与说明

    上一章已经简单介绍了CKEditor控件可以编写C#代码,然后可以通过ajax去调用,但是要在网页上面编写所有C#后台逻辑,肯定痛苦死了,不说实现复杂的逻辑,就算实现一个简单增删改查,都会让人头痛欲裂 ...

  10. bzoj 1179[Apio2009]Atm (tarjan+spfa)

    题目 输入 第一行包含两个整数N.M.N表示路口的个数,M表示道路条数.接下来M行,每行两个整数,这两个整数都在1到N之间,第i+1行的两个整数表示第i条道路的起点和终点的路口编号.接下来N行,每行一 ...