有人能帮我理解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是我已经安装的东西的升级,它将替换这些文件.升级包。
具体来说,我试图在Fedora 14操作系统上升级VirtualBox。我正在运行以下命令:
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>很明显我在这里不懂什么。有人能解释一下这件事吗?
发布于 2011-10-30 21:54:36
-U只能升级同名的包,而且两个包的名称不同。一个叫做VirtualBox-4.0,另一个叫做VirtualBox-4.1。
VirtualBox-4.0-4.0.12_72916_fedora14-1 .x86_64
^name ^version ^release ^arch发布于 2013-01-16 00:26:47
RPM只是一个包,即命令只安装VirtualBox包。如果新版本依赖于其他内容的更新版本,则命令将失败(显然)。
您可以尝试"yum localinstall VirtualBox-“(yum首先解决依赖关系,并获取所需的任何信息)。如果新版本需要更新,而且某些现有的内容确实取决于更新(并且没有新版本可用),这也可能会失败。
发布于 2018-09-30 05:28:42
在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.https://unix.stackexchange.com/questions/23642
复制相似问题