百胜安装问题

时间:2018-10-19 23:02:00

标签: g++ rpm yum libstdc++

我正在尝试在Redhat Linux 6机器中安装g ++ 4.1.2(似乎已经安装了gcc 4.1.2)。当我第一次尝试通过yum运行gcc-c ++-4.1.2 rpm时,遇到以下依赖性问题,

[root@Cham1WS Desktop]# yum install gcc-c++-4.1.2-55.el5.x86_64.rpm 
Setting up Install Process 
Examining gcc-c++-4.1.2-55.el5.x86_64.rpm: gcc-c++-4.1.2-55.el5.x86_64 
Marking gcc-c++-4.1.2-55.el5.x86_64.rpm to be installed 
Resolving Dependencies 
--> Running transaction check 
---> Package gcc-c++.x86_64 0:4.1.2-55.el5 will be installed 
--> Processing Dependency: libstdc++ = 4.1.2-55.el5 for package: gcc-c++-  4.1.2-55.el5.x86_64 
--> Processing Dependency: libstdc++-devel = 4.1.2-55.el5 for package: gcc-c++-4.1.2-55.el5.x86_64 
--> Finished Dependency Resolution 
Error: Package: gcc-c++-4.1.2-55.el5.x86_64 (/gcc-c++-4.1.2-55.el5.x86_64) 
       Requires: libstdc++-devel = 4.1.2-55.el5 
Error: Package: gcc-c++-4.1.2-55.el5.x86_64 (/gcc-c++-4.1.2-55.el5.x86_64) 
       Requires: libstdc++ = 4.1.2-55.el5 
       Installed: libstdc++-4.4.7-16.el6.x86_64 (@anaconda-   RedHatEnterpriseLinux-201507020259.x86_64/6.7) 
           libstdc++ = 4.4.4-15.el6 
           libstdc++ = 4.4.7-16.el6 
 You could try using --skip-broken to work around the problem 
 You could try running: rpm -Va --nofiles --nodigest 

所以,看来我需要安装libstdc ++-devel-4.1.2-55.el5.x86_64.rpm。所以我尝试安装它,并且得到了下面的依赖项,

[root@Cham1WS Desktop]# yum install libstdc++-devel-4.1.2-55.el5.x86_64.rpm 
Setting up Install Process 
Examining libstdc++-devel-4.1.2-55.el5.x86_64.rpm: libstdc++-devel-4.1.2-55.el5.x86_64 
Marking libstdc++-devel-4.1.2-55.el5.x86_64.rpm to be installed 
Resolving Dependencies 
--> Running transaction check 
---> Package libstdc++-devel.x86_64 0:4.1.2-55.el5 will be installed 
--> Processing Dependency: libstdc++ = 4.1.2-55.el5 for package: libstdc++-devel-4.1.2-55.el5.x86_64 
--> Finished Dependency Resolution 
Error: Package: libstdc++-devel-4.1.2-55.el5.x86_64 (/libstdc++-devel-4.1.2-55.el5.x86_64) 
       Requires: libstdc++ = 4.1.2-55.el5 
       Installed: libstdc++-4.4.7-16.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7) 
           libstdc++ = 4.4.4-15.el6 
           libstdc++ = 4.4.7-16.el6 
You could try using --skip-broken to work around the problem 
You could try running: rpm -Va --nofiles --nodigest 

似乎已经安装了libstdc ++的早期版本。无论如何,我尝试安装libstdc ++-4.1.2-55.el5.x86_64.rpm(不是“ devel”),并且说它已经安装了。

[root@Cham1WS Desktop]# yum install libstdc++-4.1.2-55.el5.x86_64.rpm 
Setting up Install Process 
Examining libstdc++-4.1.2-55.el5.x86_64.rpm: libstdc++-4.1.2-55.el5.x86_64 
libstdc++-4.1.2-55.el5.x86_64.rpm: does not update installed package. 
Error: Nothing to do

但是,如果我尝试安装“ libstdc ++-devel-4.1.2-55.el5.x86_64.rpm”,我将再次获得更依赖的文件。看来问题是我已经安装了较新版本的libstdc ++

1)如何解决此问题? 2)我需要卸载更高版本的libstdc ++吗?

1 个答案:

答案 0 :(得分:0)

似乎您在使用yum是错误的方式:您应该让yum连接到一些存储库,然后让他找出依赖关系。

通过安装 el5 软件包的方式,这意味着安装centos5而不是centos6的软件包。尝试找到类似的软件包,但是对于centos6,那会更好。尝试使用可能对您有帮助的 epel 存储库(在此处查看如何启用它:https://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/