= RPM How-To for end users = [[PageOutline]] This section contains basic informations for end users about installing, upgrading and removing packages with YUM and RPM. == Handy YUM and RPM commands ||'''yum install''' __pkg__ ||Install the latest version of the package named __pkg__ (including all packages it needs for its work, if any) ||'''yum remove''' __pkg__ ||Uninstall the package named __pkg__ (including all installed packages that need the removed one, if any) ||'''yum check-update''' ||List available updates (newer versions) for all installed packages ||'''yum update''' ||Install all available updates (if any) ||'''yum update''' __pkg__ ||Update only the package named __pkg__ (and packages it needs, if newer versions of them are required) ||'''yum info''' __pkg__ ||Show information about the package named __pkg__ ||'''yum list installed''' ||List all installed packages ||'''yum list avaliable''' qt* ||List all available packages with names starting from "qt" ||'''yum list''' *zip* ||List all packages containing "zip" in names (both installed and available) ||'''yum clean packages''' ||Delete all downloaded files containing installed packages (packages themselves are not uninstalled) You may find more detailed information about YUM and RPM using the following links: * YUM command manual page: http://linuxcommand.org/man_pages/yum8.html * RPM command manual page: http://www.rpm.org/max-rpm-snapshot/rpm.8.html * YUM website: http://yum.baseurl.org/ * RPM website: http://www.rpm.org/ == Platform selection for binaries == The default base architecture setting for RPM/YUM is the i386 platform; if you own a i686 CPU (PentiumPro and above), you can tell YUM to inspect i686 package list first, and fallback to i386 if none found. To enable i686, create a 'platform' text file in your %UNIXROOT%\etc\rpm directory with the following text in it: {{{ i686-OS/2-OS/2 }}} Binaries are getting built also for Pentium4 and above processors, use the following text to enable this: {{{ pentium4-OS/2-OS/2 }}} Access to pentium4 packages requires the latest YUM package. == Note about upgrading from 2010 RPM builds == Newer RPM builds are now using Berkeley DB for storing package informations, while previous builds were using SqLite 3 for this task. Since SqLite support is being phased out, RPM moved to BDB. After updating you need to convert the old database to the new format: you can check this running {{{ rpm -qa }}} at the command prompt; you will get a SIGSEV error or a message about wrong database format: {{{ [E:\]rpm -qa rpmdb: __db_meta_setup: /@unixroot/var/lib/rpm/Packages: unexpected file type or format error: cannot open Packages index using db3 - Invalid argument (22) error: cannot open Packages database in /@unixroot/var/lib/rpm rpmdb: __db_meta_setup: /@unixroot/var/lib/rpm/Packages: unexpected file type or format error: cannot open Packages database in /@unixroot/var/lib/rpm }}} To upgrade the database, use the following command sequence: {{{ rpm --define '_dbapi 4' --rebuilddb mv /@unixroot/var/lib/rpm /@unixroot/var/lib/rpm.bak mv /@unixroot/var/lib/rpm.rebuild /@unixroot/var/lib/rpm }}} You can test operation running {{{ rpm -qa }}} you will get the list of installed packages. The older SqLite databases are now saved into mv /@unixroot/var/lib/rpm.bak, if everything is ok you can delete this directory.