已安装和未同时安装的软件包

fri*_*sco 4 yum centos package-management

前段时间我尝试在我的 CentOS 5 服务器上安装 Steam 并尝试了我在互联网上找到的几乎所有东西,似乎我已经能够同时安装和不安装 libstdc++。

CPanel 无法更新,因为它没有找到安装的正确版本,但是 yum 无法安装它,因为它已经安装了。

¿如何解决这种情况并达到一致的状态?

# yum install libstdc++-4.1.2-55.el5
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * contrib: mirror.wiredtree.com
addons                                                   | 1.9 kB     00:00
base                                                     | 1.1 kB     00:00
centosplus                                               | 1.9 kB     00:00
contrib                                                  | 1.9 kB     00:00
extras                                                   | 2.1 kB     00:00
updates                                                  | 1.9 kB     00:00
wiredtree                                                |  951 B     00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
Package matching libstdc++-4.1.2-55.el5.i386 already installed. Checking for update.
Nothing to do

# yum remove libstdc++-4.1.2-55.el5
Loaded plugins: fastestmirror
Setting up Remove Process
No Match for argument: libstdc++-4.1.2-55.el5
Loading mirror speeds from cached hostfile
 * contrib: mirror.wiredtree.com
addons                                                   | 1.9 kB     00:00
base                                                     | 1.1 kB     00:00
centosplus                                               | 1.9 kB     00:00
contrib                                                  | 1.9 kB     00:00
extras                                                   | 2.1 kB     00:00
updates                                                  | 1.9 kB     00:00
wiredtree                                                |  951 B     00:00
Excluding Packages in global exclude list
Finished
Package(s) libstdc++-4.1.2-55.el5 available, but not installed.
No Packages marked for removal


# yum reinstall libstdc++-4.1.2-55.el5
Loaded plugins: fastestmirror
Setting up Reinstall Process
Loading mirror speeds from cached hostfile
 * contrib: mirror.wiredtree.com
addons                                                   | 1.9 kB     00:00
base                                                     | 1.1 kB     00:00
centosplus                                               | 1.9 kB     00:00
contrib                                                  | 1.9 kB     00:00
extras                                                   | 2.1 kB     00:00
updates                                                  | 1.9 kB     00:00
wiredtree                                                |  951 B     00:00
Excluding Packages in global exclude list
Finished
No Match for argument: libstdc++-4.1.2-55.el5
Package(s) libstdc++-4.1.2-55.el5 available, but not installed.
Nothing to do

# yum --showduplicates list libstdc++ | expand
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * contrib: mirror.wiredtree.com
Excluding Packages in global exclude list
Finished
Installed Packages
libstdc++.i386                      4.3.2-7                            installed
Available Packages
libstdc++.i386                      4.1.2-55.el5                       base
Run Code Online (Sandbox Code Playgroud)

fri*_*sco 5

感谢 Anthony Geoghegan 为我指明了正确的方向,我找到了一个可行的解决方案

rpm -e --justdb --nodeps libstdc++
Run Code Online (Sandbox Code Playgroud)

这将从数据库中删除 pacakge 而不触及文件,然后简单yum install将起作用。