패키지가 설치됨과 동시에 설치되지 않음

패키지가 설치됨과 동시에 설치되지 않음

얼마 전 저는 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

답변1

Anthony Geoghegan이 나에게 올바른 방향을 알려준 덕분에 나는 효과적인 해결책을 찾을 수 있었습니다.

rpm -e --justdb --nodeps libstdc++

파일을 건드리지 않고 db에서 패키지를 제거하면 간단 yum install하게 작동합니다.

답변2

관심이 없어서 먼저 다음 명령을 사용하여 패키지를 제거해 보겠습니다 rpm.

rpm -e libstdc++

그러나 의 내부 데이터베이스가 손상되어 위의 명령이 작동하지 않을 것으로 의심되므로 rpm다음을 사용하여 데이터베이스를 다시 작성해 보겠습니다.

rpm --rebuilddb

답변3

이는 x86_64 및 multilib 패키지에서 발생할 수 있습니다. yum remove libstdc++64비트 버전을 제거하려고 시도했지만 설치되지 않았습니다. 따라서 그러한 상황에서는 패키지를 아치로 처리해야 합니다. 즉:

yum remove libstdc++-4.1.2-55.el5.i386

답변4

내 호스트에서도 비슷한 상황이 발생했습니다.

# yum --showduplicates list coreutils-libs

동시에 설치된 것으로 보이는 동일한 패키지의 두 가지 버전을 반환했습니다.

Installed Packages
coreutils-libs.x86_64                  8.4-37.el6_7.3                 @updates
coreutils-libs.x86_64                  8.4-43.el6                     installed
Available Packages
coreutils-libs.x86_64                  8.4-43.el6                     base

내가 시도했을 때

# yum remove coreutils-libs

다음을 포함하여 다른 종속성을 제거해야 하기 때문에 실패했습니다.그 자체.

그러나 몇 번의 시행착오 끝에 이를 고칠 수 있었습니다. 핵심은 버전 및 릴리스 접미사를 포함하여 패키지의 전체 이름을 사용하는 것입니다.

요점은 패키지 중 하나를 제거하려면 물리적 제거가 필요하지만 두 패키지 중 다른 하나를 제거하면 rpm DB 레코드만 제거되어 데이터베이스를 일관된 상태로 가져온다는 것입니다.

내 경우에는 나도 그랬다는 것을 알 수 있었다coreutils-8.4-37.el6_7.3패키지가 설치되었으므로 -37.el6_7.3 릴리스가 아마도 올바른 릴리스일 것입니다(즉, 보존해야 함).

내가 말했을 때다른 하나를 제거하려면

# yum remove coreutils-libs-8.4-43.el6

모든 것이 오류 없이 실행되었고 RPM DB가 다시 일관성을 갖게 되었습니다.

관련 정보