[转帖]Linux make: g++: Command not found

linux,make,command,not,found · 浏览次数 : 0

小编点评

内容生成时需要带简单的排版,例如: 1. 使用空格或制表进行排列。 2. 使用缩排或缩排符号进行排列。 3. 使用斜排或斜排符号进行排列。 4. 使用依赖符号进行排列。 5. 使用空格或制表进行排列。

正文

https://www.cnblogs.com/kerrycode/p/4748606.html

 

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相似的内容:

[转帖]Linux make: g++: Command not found

https://www.cnblogs.com/kerrycode/p/4748606.html Linux使用make命令时遇到“make: g++: Command not found”,这个主要是没有安装gcc-c++.x86_64,如下所示 [root@localhost nethogs]#

[转帖]linux系统make命令详解

https://www.jianshu.com/p/9a3fc3edb18c 姓名:曾国强 学号:19021210984 转载自https://blog.csdn.net/ididcan/article/details/6193199 【嵌牛导读】make是linux和unix系统常用的编译命令。m

[转帖]Linux中./configure、make、make install命令详解

简单来说,make 是编译,make install 是安装。 总结:linux编译安装中configure、make和make install各自的作用 • ./configure是用来检测你的安装平台的目标特征的。比如它会检测你是不是有CC或GCC,并不是需要CC或GCC,它是个shell脚本。

[转帖]Linux 命令详解(三)./configure、make、make install 命令

https://www.cnblogs.com/tinywan/p/7230039.html 这些都是典型的使用GNU的AUTOCONF和AUTOMAKE产生的程序的安装步骤 一、基本信息 1、./configure 是用来检测你的安装平台的目标特征的。比如它会检测你是不是有CC或GCC,并不是需要

[转帖]Linux磁盘格式化(mkfs、mkfs.xfs、mkfs.ext4)、Linux文件系统的校验(xfs_repair、fsck_ext4)

https://blog.csdn.net/qq_41453285/article/details/86822769 一、mkfs命令磁盘分区完毕后自然就是要进行文件系统的格式化格式化其实就是创建文件系统。命令就是 >mkfs(make fileststem),这个命令只是个综合命令。它会调用正确的

[转帖][译] 如何基于 Cilium 和 eBPF 打造可感知微服务的 Linux(InfoQ, 2019)

http://arthurchiao.art/blog/how-to-make-linux-microservice-aware-with-cilium-zh/ 译者序 本文内容来自 2019 年的一个技术分享 How to Make Linux Microservice-Aware with Ci

[转帖]浅析./configure、make、make install之间的关系

https://www.cnblogs.com/zcj-0928/articles/16261389.html 写在前面: 可能我们都知道linux中安装软件方式的一种是:将源码sourcecode.tar.gz进行解压,然后输入./configure,接着make,最后make install,一

[转帖]Linux 磁盘I/O 调度算法 说明

2022-08-23 13:031361转载Linux 1 Linux 4.0 IO协议栈框架图 I/O 调度算法在各个进程竞争磁盘I/O的时候担当了裁判的角色。他要求请求的次序和时机做最优化的处理,以求得尽可能最好的整体I/O性能。 Linux 4.0 IO协议栈框架图 I/O调度程序的总结 当向

[转帖]Linux中常见IO调度器

https://www.jianshu.com/p/3c16e39a005a 单队列调度算法多队列调度算法 deadline mqdeadlines cfq bfq noop none kyber 对于磁盘I/O,Linux提供了cfq, deadline和noop三种调度策略 cfq: 这个名字是

[转帖]Linux 平台使用shc 工具加密shell 脚本

2021-08-03 20:4510030原创Linux 本文链接:https://www.cndba.cn/dave/article/4642 1 shc 工具说明 shell 脚本是常用脚本,运维中经常使用,但有时候在shell 脚本中会包含一些敏感的信息,比如密码或者特殊的参数,此时我们就可以