开发者社区> 问答> 正文

gcc与c++安装遇到rpm依赖包错误

centOS6.5下 安装pcre-8.38时,报没有安装gcc环境, 我去网上下载rpm包依次安装 但是到 安装libgomp,cpp时都报依赖错误,麻烦大神帮忙看下 而且 前面试装docker的时候修改过yum的配置文件 yum下载也不好使了 谢谢各位。

[root@lsm121 pcre-8.38]# ./configure
...
checking windows.h presence... no
checking for windows.h... no
configure: error: You need a C++ compiler for C++ support.
[root@lsm121 local]# rpm -Uvh libgomp-4.4.7-4.el6.x86_64.rpm 
error: Failed dependencies:
    libgomp = 4.4.7-16.el6 is needed by (installed) gcc-4.4.7-16.el6.x86_64
[root@lsm121 local]# rpm -Uvh gcc-4.4.7-4.el6.x86_64.rpm 
error: Failed dependencies:
    cpp = 4.4.7-4.el6 is needed by gcc-4.4.7-4.el6.x86_64
    libgomp = 4.4.7-4.el6 is needed by gcc-4.4.7-4.el6.x86_64
[root@lsm121 local]# rpm -Uvh cpp-4.4.7-4.el6.x86_64.rpm 
error: Failed dependencies:
    cpp = 4.4.7-16.el6 is needed by (installed) gcc-4.4.7-16.el6.x86_64
[root@lsm121 local]# rpm -Uvh gcc-c++-4.4.7-4.el6.x86_64.rpm 
error: Failed dependencies:
    gcc = 4.4.7-4.el6 is needed by gcc-c++-4.4.7-4.el6.x86_64
[root@lsm121 local]# rpm -Uvh cpp-4.4.7-4.el6.x86_64.rpm 
error: Failed dependencies:
    cpp = 4.4.7-16.el6 is needed by (installed) gcc-4.4.7-16.el6.x86_64
[root@lsm121 local]# rpm -ivh cpp-4.4.7-4.el6.x86_64.rpm 
Preparing...                ########################################### [100%]
    package cpp-4.4.7-16.el6.x86_64 (which is newer than cpp-4.4.7-4.el6.x86_64) is already installed
    file /usr/bin/cpp from install of cpp-4.4.7-4.el6.x86_64 conflicts with file from package cpp-4.4.7-16.el6.x86_64
    file /usr/libexec/gcc/x86_64-redhat-linux/4.4.4/cc1 from install of cpp-4.4.7-4.el6.x86_64 conflicts with file from package cpp-4.4.7-16.el6.x86_64
[root@lsm121 local]# rpm -ivh libgomp-4.4.7-4.el6.x86_64.rpm 
Preparing...                ########################################### [100%]
    package libgomp-4.4.7-16.el6.x86_64 (which is newer than libgomp-4.4.7-4.el6.x86_64) is already installed
    file /usr/lib64/libgomp.so.1.0.0 from install of libgomp-4.4.7-4.el6.x86_64 conflicts with file from package libgomp-4.4.7-16.el6.x86_64
[root@lsm121 local]# rpm -Uvh gcc-4.4.7-4.el6.x86_64.rpm 
error: Failed dependencies:
    cpp = 4.4.7-4.el6 is needed by gcc-4.4.7-4.el6.x86_64
    libgomp = 4.4.7-4.el6 is needed by gcc-4.4.7-4.el6.x86_64
[root@lsm121 local]# rpm -ivh gcc-4.4.7-4.el6.x86_64.rpm 
error: Failed dependencies:
    cpp = 4.4.7-4.el6 is needed by gcc-4.4.7-4.el6.x86_64
    libgomp = 4.4.7-4.el6 is needed by gcc-4.4.7-4.el6.x86_64
[root@lsm121 local]# rpm -i gcc
error: open of gcc failed: No such file or directory
[root@lsm121 local]# yum install gcc
Setting up Install Process
Nothing to do

展开
收起
a123456678 2016-06-15 16:55:19 6452 0
1 条回答
写回答
取消 提交回答
  • 先安装 gcc-4.4.7-4.el6.x86_64

    2019-07-17 19:39:42
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
使用C++11开发PHP7扩展 立即下载
GPON Class C++ SFP O;T Transce 立即下载
GPON Class C++ SFP OLT Transce 立即下载