rpm --upgrade가 업그레이드되지 않습니까?

rpm --upgrade가 업그레이드되지 않습니까?

누구든지 rpm 명령을 이해하도록 도와줄 수 있습니까? rpm 매뉴얼 페이지에서:

rpm {-U|--upgrade} [install-options] PACKAGE_FILE ...

This upgrades or installs the package currently installed to a newer version.
This is the same as install, except all other version(s) of the package are
removed after the new package is installed.

PACKAGE_FILE내가 이미 설치한 항목에 대한 업그레이드라고 표시하면 업그레이드 패키지 파일이 대체된다는 점을 이해하고 있습니다 .

특히, 업그레이드하려고 합니다.가상 상자안에페도라14운영 체제. 다음 명령을 실행하고 있습니다.

rpm -Uvh VirtualBox-4.1-4.1.4_74291_fedora14-1.x86_64.rpm

이전 버전의 파일이 존재한다는 오류가 많이 발생합니다.

... <similar output omitted>

file /bla/virtualbox/bla/powernotification-r0drv.c from install of
   VirtualBox-4.1-4.1.4_74291_fedora14-1.x86_64 conflicts with file from 
   package VirtualBox-4.0-4.0.12_72916_fedora14-1.x86_64

... </similar output omitted>

나는 분명히 여기서 뭔가를 이해하지 못합니다. 누구든지 이것을 설명할 수 있나요?

답변1

-U이름이 같은 패키지만 업그레이드할 수 있으며, 두 패키지 이름은 다릅니다. 하나는 짖고 VirtualBox-4.0있고 다른 하나는 짖고 있습니다 VirtualBox-4.1.

VirtualBox-4.0-4.0.12_72916_fedora14-1       .x86_64
^name          ^version              ^release ^arch

답변2

RPM은 명령이 설치하는 패키지일 뿐입니다.오직버추얼박스 패키지. 새 버전이 업데이트된 다른 버전에 의존하는 경우 명령이 실패합니다(분명히).

"yum localinstall VirtualBox-..."를 시도해 볼 수 있습니다(yum은 종속성을 먼저 해결하고 필요한 모든 것을 얻습니다). 새 버전에 업데이트가 필요하고 일부 기존 콘텐츠가 업데이트에 종속되는 경우(새 버전을 사용할 수 없는 경우)에도 실패할 수 있습니다.

답변3

VirtualBox의 특정 경우에는 안전하게 지우고 다시 설치할 수 있습니다(예:).

# rpm --erase VirtualBox-5.1-5.1.28_117968_el6-1.i686
# rpm --install VirtualBox-5.2-5.2.18_124319_el6-1.i686.rpm

위에서 언급했듯이 이는 패키지 이름에 버전 번호가 포함되어 있기 때문에 발생하므로 RPM은 해당 패키지가 실제로 동일한 패키지인지 확신할 수 없습니다(Oracle의 잘못된 패키징 결정일 수 있음).

# rpm -q -i VirtualBox
package VirtualBox is not installed

처음에는 혼란스러울 수 있지만 버전 번호는 패키지 이름의 일부가 되므로 반드시 입력해야 합니다.

# rpm -q -i VirtualBox-5.2
Name        : VirtualBox-5.2               Relocations: (not relocatable)
Version     : 5.2.18_124319_el6                 Vendor: Oracle Corporation
Release     : 1                             Build Date: Tue 14 Aug 2018 01:15:57 PM GMT
Install Date: Sun 30 Sep 2018 04:45:04 AM GMT      Build Host: tinderlin4.de.oracle.com
Group       : Applications/System           Source RPM: VirtualBox-5.2-5.2.18_124319_el6-1.src.rpm
Size        : 176286250                        License: GPLv2
Signature   : DSA/SHA1, Tue 14 Aug 2018 04:06:58 PM GMT, Key ID 54422a4b98ab5139
URL         : http://www.virtualbox.org/
Summary     : Oracle VM VirtualBox
Description :
VirtualBox is a powerful PC virtualization solution allowing
you to run a wide range of PC operating systems on your Linux
system. This includes Windows, Linux, FreeBSD, DOS, OpenBSD
and others. VirtualBox comes with a broad feature set and
excellent performance, making it the premier virtualization
software solution on the market.

관련 정보