---
title: "g++:commandnotfound"
author: "mofeichen"
date: "2014-05-15T11:16:41Z"
tags: []
categories: ["操作系统"]
slug: "g-commandnotfound"
draft: true
lastmod: "2014-11-03T18:48:52Z"
id: 2066726
url: "https://mofeichen.iteye.com/blog/2066726"
---

安装nigex运行make命令是提示“G++：commond not found”问题：

在网上找了折腾了一天，基本上都是通过  **yuminstallgcc-c++...**

来实现安装，但是不知什么原因，该方法始终不成功，但可通过另外一种方法解决该问题

 

原因：

         VM安装RedHat镜像文件，如果选择简单安装，不会安装g++的包。

解决办法：

1、在RedHat压缩包：\\rhel-server-6.3-x86\_64-dvd\\Packages中找到

      libstdc++-devel-4.4.6-4.el6.x86\_64.rpm

      gcc-c++-4.4.6-4.el6.x86\_64.rpm

2、把这两个包上传到linux里进行安装

3、因为gcc-c++需要依赖libstadc所以应该先安装libstdc

             安装命令：rpm -ivh gcc-c++-4.4.7-3.el6.x86\_64.rpm

                              rpm -ivh libstdc++-devel-4.4.7-3.el6.x86\_64.rpm

  即：rpm -ivh /路径+包名称 

 

软件包下载路径

 

http://mirror.centos.org/centos/6/os/x86\_64/Packages/

 

http://rpm.pbone.net/