g++ - 百胜安装问题
问题描述
我正在尝试在 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++吗?
解决方案
看来你用yum
错了方法:你应该让 yum 连接到一些存储库,让他找出依赖关系。
顺便说一句,您正在安装el5软件包,这意味着 centos5 的软件包,而不是 centos6。尝试寻找类似的软件包,但对于 centos6,那会更好;尝试使用可能对您有帮助的epel存储库(查看如何启用它:https ://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/ )
推荐阅读
- java - 如何在java中移动数组中的元素?
- android - 在自定义视图中覆盖 onTouchEvent 时,onClickListener 不起作用
- php - 使用 Docker 和 Laravel 我在 MySQL 中遇到了这个错误:“SQLSTATE[HY000] [2002] No such file or directory”
- android - 如何将 adb screenrecord 输出重定向到 pc(windows/linux)存储
- r - R如何将可选参数的NULL传递给函数(例如在for循环中)
- modal-dialog - 如何检查页面组件是由 navController 还是 modalController 创建的
- javascript - 不止一个验证,令人困惑
- node-red - 如何“连接”动态创建的 UI 开关?
- c - C 函数的内存布局
- php - 如何获得一个类似 array_walk 的 PHP 函数,它会返回一个数组?