CentOS에서 libpng-devel(1.5.3)을 libpng12-devel RPM으로 교체

CentOS에서 libpng-devel(1.5.3)을 libpng12-devel RPM으로 교체

다른 많은 RPM이 포함된 CentOS 6.4 시스템이 있습니다.

libpng-devel을 libpng12.devel로 바꾸고 싶습니다. 이렇게 하면 rpm -e libpng-devel다음과 같은 결과를 얻습니다.

error: Failed dependencies:
    pkgconfig(libpng) is needed by (installed) cairo-devel-1.10.2-7.el6.x86_64
    pkgconfig(libpng15) is needed by (installed) gdk-pixbuf2-devel-2.26.1-1.el6.x86_64
    libpng-devel is needed by (installed) cairo-devel-1.10.2-7.el6.x86_64
    libpng-devel is needed by (installed) gtk2-devel-2.24.10-1.el6.x86_64
    libpng-devel(x86-64) = 2:1.5.13-2.el6 is needed by (installed) libpng-static-2:1.5.13-2.el6.x86_64

이것을 제거하면 토끼 굴에 빠질 것입니다.

yum 다운그레이드를 시도했는데 다음 메시지가 나타납니다.

[mono@localhost ~]$ sudo yum downgrade libpng
Loaded plugins: fastestmirror
Setting up Downgrade Process
Loading mirror speeds from cached hostfile
 * base: mirror.net.cen.ct.gov
 * extras: mirror.dattobackup.com
 * rpmforge: repoforge.mirror.constant.com
 * updates: mirror.umd.edu
Resolving Dependencies
--> Running transaction check
---> Package libpng.x86_64 2:1.2.49-1.el6_2 will be a downgrade
---> Package libpng.x86_64 2:1.5.13-2.el6 will be erased
--> Finished Dependency Resolution
Error: Package: gdk-pixbuf2-devel-2.26.1-1.el6.x86_64 (installed)
           Requires: libpng15.so.15()(64bit)
           Removing: 2:libpng-1.5.13-2.el6.x86_64 (installed)
               libpng15.so.15()(64bit)
           Downgraded By: 2:libpng-1.2.49-1.el6_2.x86_64 (base)
               Not found
Error: Package: 2:libpng-devel-1.5.13-2.el6.x86_64 (installed)
           Requires: libpng(x86-64) = 2:1.5.13-2.el6
           Removing: 2:libpng-1.5.13-2.el6.x86_64 (installed)
               libpng(x86-64) = 2:1.5.13-2.el6
           Downgraded By: 2:libpng-1.2.49-1.el6_2.x86_64 (base)
               libpng(x86-64) = 2:1.2.49-1.el6_2
Error: Package: 2:libpng-devel-1.5.13-2.el6.x86_64 (installed)
           Requires: libpng15.so.15()(64bit)
           Removing: 2:libpng-1.5.13-2.el6.x86_64 (installed)
               libpng15.so.15()(64bit)
           Downgraded By: 2:libpng-1.2.49-1.el6_2.x86_64 (base)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[mono@localhost ~]$

다른 사람들을 다운그레이드하면 나도 비슷한 곤경에 처하게 됩니다.

localinstall/localupdate를 시도했지만 둘 중 하나도 작동하지 않는 것 같습니다.

[mono@localhost ~]$ sudo yum --nogpgcheck localinstall ~/rpmbuild/RPMS/x86_64/libpng12-devel-1.2.50-3.el6.x86_64.rpm
Loaded plugins: fastestmirror
Setting up Local Package Process
Examining /home/mono/rpmbuild/RPMS/x86_64/libpng12-devel-1.2.50-3.el6.x86_64.rpm: libpng12-devel-1.2.50-3.el6.x86_64
Marking /home/mono/rpmbuild/RPMS/x86_64/libpng12-devel-1.2.50-3.el6.x86_64.rpm to be installed
Loading mirror speeds from cached hostfile
 * base: mirror.net.cen.ct.gov
 * extras: mirror.dattobackup.com
 * rpmforge: repoforge.mirror.constant.com
 * updates: mirror.umd.edu
Resolving Dependencies
--> Running transaction check
---> Package libpng12-devel.x86_64 0:1.2.50-3.el6 will be installed
--> Processing Conflict: libpng12-devel-1.2.50-3.el6.x86_64 conflicts libpng-devel
No package matched to upgrade: libpng12-devel
--> Finished Dependency Resolution
Error: libpng12-devel conflicts with 2:libpng-devel-1.5.13-2.el6.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[mono@localhost ~]$ sudo yum --nogpgcheck localupdate ~/rpmbuild/RPMS/x86_64/libpng12-devel-1.2.50-3.el6.x86_64.rpm
Loaded plugins: fastestmirror
Setting up Local Package Process
Examining /home/mono/rpmbuild/RPMS/x86_64/libpng12-devel-1.2.50-3.el6.x86_64.rpm: libpng12-devel-1.2.50-3.el6.x86_64
Package libpng12-devel not installed, cannot update it. Run yum install to install it instead.
Nothing to do
[mono@localhost ~]$

동일한 명령에서 하나의 rpm을 제거하고 다른 rpm을 추가하는 방법이 있습니까? 다중 명령 RPM 트랜잭션이 있습니까? RPM 트랜잭션은 기록 감사에 사용되는 것으로 보이므로 Google에서 용어를 잘못 검색한 것 같습니다. 내 시스템에서 이러한 RPM을 많이 교체해야 하므로 rpm 사양을 수정하고 다시 빌드하여 연결하는 방법이 있다면 그것도 허용될 것입니다.

답변1

-e일반적으로 ( )를 먼저 제거한 다음 설치 하지 않습니다 . 이렇게 하면 RPM이 이 RPM에 의존하는 모든 응용 프로그램을 제거하게 됩니다. 대신 업그레이드를 원합니다.

$ rpm -Uvh libpng12-devel

이 패키지가 실제로 "libpng" 업그레이드의 드롭인 경우 단일 이동으로 제거 및 설치되므로 종속성이 완화됩니다.

Yum을 사용하세요

저는 이것을 항상 하고 있는데 yum, 이는 일반적인 RPM 문제뿐만 아니라 이와 같은 까다로운 문제를 해결하는 데 도움이 될 수 있습니다. 다음 명령을 사용하십시오.

$ yum update libpng12-devel

다음 명령을 사용하여 로컬 RPM을 설치할 수도 있습니다 yum.

$ yum --nogpgcheck localinstall libpng12-devel....rpm

이는 종종 이러한 유형의 까다로운 패키지 관리 작업을 가장 잘 처리하는 방법에 대한 조언을 제공합니다.

답변2

예, libpng엉망입니다. 다음은 몇 가지 팁입니다.

첫째, 온전한지 확인합니다.

package-cleanup --cleandupes

교환은 일반적으로 작동하지만 몇 가지 실험이 필요할 수 있습니다.

yum swap -- install libpng12 libpng12-devel -- remove libpng libpng-devel

교묘하다고 느끼면 언제든지 multilib 검사를 건너뛸 수 있습니다.

--setopt=protected_multilib=false

관련 정보