tree-1.5.3-2.fc20.x86_64.rpm
. The file name includes the package name (tree
), version (1.5.3
), release (2
), operating system major version (fc20
) and CPU architecture (x86_64
).
rpm
's -U
option to:
rpm -U <rpm_file>
is able to perform the function of either upgrading or installing as is appropriate for the package.
tree-1.5.3-2.fc20.x86_64.rpm
package is in the current directory, log in as root and type the following command at a shell prompt to either upgrade or install the tree package as determined by rpm
:
rpm -Uvh tree-1.5.3-2.fc20.x86_64.rpm
Use -Uvh for nicely-formatted RPM installs
-v
and -h
options (which are combined with -U
) cause rpm to print more verbose output and display a progress meter using hash signs.
Preparing... ########################################### [100%] 1:tree ########################################### [100%]
Always use the -i (install) option to install new kernel packages!
rpm
provides two different options for installing packages: the aforementioned -U
option (which historically stands for upgrade), and the -i
option, historically standing for install. Because the -U
option subsumes both install and upgrade functions, we recommend to use rpm -Uvh
with all packages except kernel packages.
-i
option to simply install a new kernel package instead of upgrading it. This is because using the -U
option to upgrade a kernel package removes the previous (older) kernel package, which could render the system unable to boot if there is a problem with the new kernel. Therefore, use the rpm -i <kernel_package>
command to install a new kernel without replacing any older kernel packages. For more information on installing kernel packages, refer to Chapter 20, Manually Upgrading the Kernel.
error: tree-1.5.2.2-4.fc20.x86_64.rpm: Header V3 RSA/SHA256 signature: BAD, key ID d22e77f2
error: tree-1.5.2.2-4.fc20.x86_64.rpm: Header V3 RSA/SHA256 signature: BAD, key ID d22e77f2
NOKEY
:
warning: tree-1.5.2.2-4.fc20.x86_64.rpm: Header V3 RSA/SHA1 signature: NOKEY, key ID 57bbccba
Preparing... ########################################### [100%] package tree-1.5.3-2.fc20.x86_64 is already installed
--replacepkgs
option, which tells RPM to ignore the error:
rpm -Uvh --replacepkgs tree-1.5.3-2.fc20.x86_64.rpm
Preparing... ################################################## file /usr/bin/foobar from install of foo-1.0-1.fc20.x86_64 conflicts with file from package bar-3.1.1.fc20.x86_64
--replacefiles
option:
rpm -Uvh --replacefiles foo-1.0-1.fc20.x86_64.rpm
error: Failed dependencies: bar.so.3()(64bit) is needed by foo-1.0-1.fc20.x86_64
rpm -Uvh foo-1.0-1.fc20.x86_64.rpm bar-3.1.1.fc20.x86_64.rpm
Preparing... ########################################### [100%] 1:foo ########################################### [ 50%] 2:bar ########################################### [100%]
--whatprovides
option to determine which package contains the required file.
rpm -q --whatprovides "bar.so.3"
bar.so.3
is in the RPM database, the name of the package is displayed:
bar-3.1.1.fc20.i586.rpm
Warning: Forcing Package Installation
rpm
to install a package that gives us a Failed dependencies
error (using the --nodeps
option), this is not recommended, and will usually result in the installed package failing to run. Installing or removing packages with rpm --nodeps
can cause applications to misbehave and/or crash, and can cause serious package management problems or, possibly, system failure. For these reasons, it is best to heed such warnings; the package manager—whether RPM, Yum or PackageKit—shows us these warnings and suggests possible fixes because accounting for dependencies is critical. The Yum package manager can perform dependency resolution and fetch dependencies from online repositories, making it safer, easier and smarter than forcing rpm
to carry out actions without regard to resolving dependencies.