To install packages on your Mandrake system, you use the urpmi command. The urpmi command will install the requested package(s) along with any dependencies they may require. There are many options that can be used with the urpmi command, I’ll start with a couple examples using the most common options, to give you an idea on the syntax used, and then list all the options. Keep in mind that urpmi is a root command and needs to be run as the root user.
The most common use of urpmi is installing a single package. An example of this is as follows:
[root@box root]# urpmi mozilla-firefox
The above command will install mozilla-firefox and any dependencies it may require.
You can also install multiple packages at a time by using the following:
[root@box root]# urpmi mozilla-firefox mozilla-thunderbird gcal
The above command would install those 3 packages and any dependencies required by them.
Another commonly used urpmi command is for updating every package on the system and is as follows:
[root@box root]# urpmi –auto-select –auto
As you can see, combining options is allowed.
The following are other options that can be used with the urpmi command:
- –bug directory
- –env directory
- –excludemedia media1,…,mediaN
- –excludepath string
- –limit-rate rate
- –media media1,…,mediaN
- –parallel alias
- –proxy proxyhost[:port|1080]
- –proxy-user user:password
- –root directory
- –sort-media media1,..mediaN
- –split-length count
- –split-level number
- –src name
- –synthesis file
With this option, if multiple packages are found matching the request, urpmi will install all of them.
When using this option, if an error occurs, urpmi will ask the user if it should continue the installation without checking dependencies. This is not advised and is why urpmi‘s default is to exit immediately.
This option allows urpmi to install all required dependencies without stopping and asking if it’s ok to do so. Often used in combination with the –auto-select option.
This option looks at your installed packages, looks at what is available in your defined media sources, and then updates any packages that it finds a newer version for.
This option will cause urpmi to try and use the X interface, if not available, the standard text (cli) interface is used (using rpm-like output).
This option creates a bug report and puts it in directory. You have to send a compressed archive of the directory to the urpmi maintainer for the bug to be reported and accepted properly.
This option clears the cache of any rpm’s there. The cache is located in /var/cache/urpmi/rpms
This option causes urpmi to use curl to download the package(s). Using curl is the default.
Use a different environment directly from a bug report to replay a bug. The directory argument is the as given to the –bug option.
This option will cause the document files to not be installed.
This option causes urpmi not to look at the specified media source(s).
This option will cause urpmi to not install files whose name begins with the defined string.
Using this option causes urpmi to assume yes on all questions.
This option will propose all packages partially matching the name given, even if one of the packages matches the given name exactly. (This is the same as -y).
This installs only the source package (no binary packages will be installed). Note: From what I can tell this option is no longer valid due to mandrake mirrors no longer being setup for urpmi use with the SRPM tree.
With this option, if some dependancies cannot be satisfied, it’ll change the selection of packages in an attempt to keep the existing packages instead of removing them. This generally rejects the upgrade of packages when a dependency error occurs.
This option tries to limit the download speed. The rate is given in butes/sec. By default, this option is not active.
With this option, urpmi will only look at the specified media for the package(s). Default is to look in all media sources.
This option causes the downloaded rpm’s to not be removed from the cache directory /var/cache/urpmi/rpms. Default is to remove downloaded/installed rpm’s from cache.
This option causes urpmi to never ask to uninstall a package, instead it simply aborts. This can be safer in auto mode.
This option allows urpmi to search in provides to find a package. This is the default behavior.
This option does not allow urpmi to search in provides to find a package. (This is the opposite of the -p option).
This option activates distributed execution of urpmi to other machines. The other machines MUST have urpmi installed on them, but they are not required to have any media sources defined on them. the alias defines which extension module is to be used by urpmi (urpmi-parallel-ka-run or urpmi-parallel-ssh are available) and which machines should be updated. The alias is defined in the file /etc/urpmi/parallel.cfg
Use this option if you need to specify HTTP proxy.
Use this option to specify a user and password for proxy authentication.
This option causes quiet mode. When calling rpm no upgrade status will be displayed.
With this, all operations and scripts will run after chroot(2) and use the file system tree rooted to for rpm install. The rpm database that resides in the rooted tree will be used, but the urpmi configuration from the normal system tree will be used.
This option is the same as –src.
With this option, you specify the order in which media sources should be sorted and looked at by urpmi.
This option will split urpmi‘s operation into small transactions of at least count packages. The default setting is 1. Setting this to 0 disables splitting into small transactions.
This option will split urpmi‘s operation into small transactions when the total number of packages to upgrade is greater than the given number. This option is activated by default with a value of 20.
This option will search a source package matching the given name and select all of its dependencies by default, unless –install-src is used in order to install the source package itself. Note: From what I can tell this option is no longer valid due to mandrake mirrors no longer being setup for urpmi use with the SRPM tree.
This option will use the specified file instead of the urpmi database to use in searching for packages and resolving dependencies.
This option will cause urpmi to ‘test’ the installation of package(s) but not install the package(s) or modify the system in any way.
This option causes urpmi to only look for package(s) and resolve dependencies using media source(s) defined as update source(s). This was defined when adding the media source(s).
This option causes urpmi to be more verbose in its output.
This option will activate or deactivate rpm signature checking. By default this is activated.
By default is used by urpmi for downloading, this option allows you to specify that wget is used instead of curl.
This option causes urpmi to use the X interface, meaning it will open a gui window in the X environment.
This option is the same as the –fuzzy option.
This option causes urpmi to look for the requested package(s) only in the media source defined as an update source.
Other methods of using urpmi
- urpmi http://www.some.url/filename.rpm
- urpmi some.filename.rpm
This command will allow you to retrieve and install a rpm from a web site. Dependency resolving will still take place.
This command allows you to install an rpm that you have previously downloaded. You must run the command in the same directory as the rpm file. Dependency resolving still takes place.