Docs/Basic tasks/Installing and removing software
From Mandriva Community Wiki
Mandriva Linux includes an extensive range of the most popular Linux applications specially packaged to work seamlessly together. Almost any application you wish to run on Mandriva Linux will be available from the official Mandriva software repositories.
Contents |
[edit] The software management applications
There are several applications included in Mandriva Linux to help you manage your installed software. The most important ones you will encounter are the software installation and removal application, which is called rpmdrake, and the software update application, which is called MandrivaUpdate.
[edit] Installing and removing software
rpmdrake is the graphical tool for installing and removing software, including updates, and managing online and physical media repositories. You can launch rpmdrake in several different ways:
- From the system menus, click Install & Remove Software
- From the Mandriva Control Center (Menu / Tools / System Tools / Configure Your Computer), go to the Software Management tab, and click the appropriate option (they all launch rpmdrake in various different modes)
- From a terminal, you can run rpmdrake, rpmdrake-remove, MandrivaUpdate or drakrpm-edit-media to launch the various rpmdrake modes. You must have administrator privileges. See this page for instructions on running commands with administrator privileges.
In Mandriva Linux 2008 and earlier, Manage Software (in the Mandriva Control Center), Install & Remove Software (in the system menus), and rpmdrake (from the console) launch rpmdrake with the All search filter pre-selected. In Mandriva Linux 2008 Spring and later, the Mandriva Control Center entry is labelled Install & Remove Software, and these methods launch rpmdrake with the Packages with GUI filter pre-selected.
rpmdrake-remove (from the console) launches rpmdrake with the Installed search filter pre-selected, which is most convenient for removing packages.
Browse Available Software (in the system menus) launches rpmdrake without administrator privileges, which means you will only be able to browse what software is installed and available, you will not be able to install or remove packages.
If you selected the link to install or add software, you can change the view of the software listed by using the drop down lists at the top left hand corner of the window. The options in the first drop down list are All, Metapackages, Packages with GUI, All updates, Security updates, Bugfixes updates, General updates and Backports.
- Metapackages are packages which contain no files, but only exist in order to depend on other packages. To see how this works, consider the task-gnome metapackage. This package contains no files, but it depends on all the packages necessary to provide the full GNOME desktop environment. This allows you to simply install the task-gnome package, which will cause all the packages needed for GNOME to work to be installed - far easier than finding and installing them one by one. The Metapackages view shows you only packages of this type.
- The Packages with GUI view shows you only packages for actual GUI applications. This is useful if you're just looking for a program and don't want to be confused by entries for non-application packages.
- The various Updates views show you only the various types of official update packages.
- Backports shows you only packages from the /backports repositories, which contain (unsupported) packages of newer versions of certain applications than were originally provided for any given release. For more information on what the /backports repositories are and how to use them, see here.
The second drop down box allows you to switch between showing all packages both installed and not yet installed, only installed packages, or only not yet installed packages.
In older releases of Mandriva Linux, the arrangement of drop down boxes and the choices they contain is somewhat different, but similar to the above in overall effect.
Enter the search term in the search box at the top right hand side of the screen to identify the name of the application you wish to install. By default, you will be searching in the names of available packages. If you click on the magnifying glass icon, you can change to searching in the summaries or descriptions of available packages, or in the lists of files they contain. Results will appear in the box below the search term. Once you have checked all the applications you wish to install, click the "Apply" button to install them. If other packages must be installed in order for the packages you selected to function correctly, rpmdrake will alert you to this now and allow you to either continue the installation including the required packages, or cancel.
If you search for an application and find that a check in the box to the left of the application name, this signifies that the application is already installed on your Mandriva Linux system.
To remove software that has already been installed, click on the box where the check appears. This will mark that application for removal or uninstallation. Similar to the installation process, if another application must be installed to fulfil your removal request, you will be warned of the other packages to be removed. You will also be prompted to accept the removal of all packages. If you do not accept the removal of all packages, none of the packages will be removed. Once you have marked all the applications you wish to remove, click the 'Apply' button to remove them.
[edit] Installing updates: MandrivaUpdate
Just as with any computer, you should update your Mandriva Linux system regularly. The MandrivaUpdate tool is provided for this purpose. Like rpmdrake, MandrivaUpdate can be run in several ways. From the Mandriva Control Center, go to the Software Management tab, and click on 'Update your system' or you can run MandrivaUpdate directly via the command MandrivaUpdate.
The first time you run MandrivaUpdate, it will ask your permission to connect to the Mandriva servers in order to download a list of sites from which it can download updates. If you give your permission, it will then ask you which mirror site to use. Pick one close to your geographical location. MandrivaUpdate will then connect to the site, download a list of available updates, and present you with a list of all available updates for packages installed on your system. All security and bugfix updates will be pre-selected.
[edit] Making more applications available
If you installed from a CD or DVD edition of Mandriva Linux and did not enable Internet software repositories during the installation process, you will have access only to the software included on your CDs or DVD(s). There are so many applications available for Mandriva Linux that they cannot all fit on the CD or DVD editions. Therefore you may find some applications you wish to install are not found when you search in rpmdrake.
This does not mean you cannot easily and conveniently access these applications, however. With the help of another utility, you can configure your system to use a public Mandriva mirror site as an application repository, and access the entire range of applications available.
The first time you run the rpmdrake utility, it will offer to set up these public repositories for you. If you agree, it will walk you through a simple process to add these repositories. If you decline, but later you wish to add these repositories, follow these steps:
- Run the Software Media Manager: open the Mandriva Control Center, and go to the Software Management tab.
- Click the link titled 'Configure media sources for install and update'.
- Click 'yes' when asked if it is OK to continue.
- Now click the 'Add...' button on the right hand side of the new screen.
- When asked whether to add 'Update sources only' or 'Full set of sources', click 'Full set of sources'.
- Click 'Yes' in reply to the question about the mirror list.
- When the mirror list appears, choose a mirror close to your geographical location. Wait for the process to complete.
Once the process is complete, you can run rpmdrake as described above, and you will have access to a wider range of applications than was previously the case.
[edit] Advanced use: the console software management applications
As a complement to the graphical software management applications discussed above, there is a range of console software management applications which share the same software repositories (so you can use either the console applications, the graphical applications, or switch between the two). A full explanation of these applications is outside the scope of this page. More information is available at this page.
Briefly, they consist of:
[edit] urpmi
urpmi is the software installation tool. It must be used with root privileges. Invoke it simply with urpmi packagename to install a package and all its dependencies. If you enter an incomplete package name it will perform a search and make suggestions. Another useful command you can use is urpmi --auto-update, which will update the list of available packages from all repositories, and install any available updates.
[edit] urpme
urpme is the software removal tool. It must be used with root privileges. Invoke it simply with urpme packagename to remove a package and any packages that depend on it. If you enter an incomplete package name it will perform a search and make suggestions.
[edit] urpmq and urpmf
urpmq and urpmf are the search tools. They can be used with regular user privileges. Generally speaking, use urpmf to find what package contains a particular file, and urpmq for all other search operations. Called with no parameters, urpmq will search package names. Refer to the man pages for further information.
[edit] urpmi.addmedia and urpmi.removemedia
These are the tools for adding and removing software repositories. Refer to the manpage for the necessary parameters. There are several sites which will help you generate urpmi.addmedia commands to add commonly used repositories: the official Mandriva mirror finder and the community maintained EasyUrpmi site are two of the most commonly used.
[edit] Advanced use: Backports and candidate updates
There are several official software repositories for Mandriva Linux. For a full list and description of all the available repositories, see this page.
Briefly, there are three sections - main, contrib and non-free. Main contains supported free software, contrib contains officially unsupported free software, and non-free contains supported non-free software.
Each section is split into four repositories: release, updates, testing and backports. Release is the main repository which contains all the packages in the section at the time of release. Updates contains all security and bugfix updates for the section.
The backports repositories contain new versions of packages: updates that are provided simply to keep the package up to date or add new features, rather than to fix bugs or security issues. For instance, in Mandriva Linux 2008, the KDE packages in /main/release and /main/updates are 3.5.7 versions (as this was the current version at the time of Mandriva Linux 2008's release), but 3.5.9 version packages are available in /main/backports. These packages are all officially unsupported.
The testing repositories contain candidate update packages. When a bug is identified in a package in Mandriva Linux, the update policy calls for the package maintainer to build a package which should resolve the problem, and upload it to the appropriate /testing repository (depending on which section the package is in). At this point, users who have experienced the issue can install the candidate update to help test that it truly resolves the problem and does not cause any other problems. They can report their findings to the relevant Bugzilla bug.
Please note that the layout of repositories was different in releases prior to Mandriva Linux 2007. The repositories discussed in this section do not exist on earlier releases.
If you followed the steps in #Making more applications available above, or added Internet repositories during the installation process, the release and updates repositories for each section will be configured on your system and enabled.
The testing and backports repositories for each section will be configured on your system but disabled (they are disabled by default to ensure you do not install packages from these repositories by accident, since they could potentially not work as well as those from the release and updates repositories). To use these repositories, simply run the Software Media Manager as discussed in #Making more applications available and check the boxes to enable them. We recommend that you do not leave either repository permanently enabled, but enable them if you wish to install a specific package from them, install the package, and then disable them again.
If you choose to add /backports and/or /contrib repositories, you should also update the lists of available software regularly, as the packages in these repositories are updated regularly. You can do this by using the 'Update media' option on the 'File' menu.
[edit] Advanced use: other ways to install software
Occasionally, you may come across an application you wish to run which is not available from any of the official Mandriva repositories, or you may have a strong need for a newer version of an application than is available from the official repositories. In these cases, you may wish to use another method of installing software.
[edit] What not to do
Users finding themselves in this situation are strongly advised not to attempt to install software packages intended for other distributions (such as Fedora or OpenSUSE), or to install software packages intended for a different Mandriva Linux release from the one they are using (including Cooker). Installing such packages carries a very high risk of rendering your system unstable or unusable.
[edit] Third party repositories
You may come across third party package repositories for Mandriva Linux, of which there are several. These may carry newer versions of applications than are available in the official repositories, or applications that are not available in the official repositories at all.
In general we advise you to use the official repositories whenever possible, but if you truly need an application or version that is not available from the official repositories, using a third party repository is a safer option than using a package for a different distribution, or installing from source code.
Mandriva cannot provide any support for packages provided by third parties: if you encounter problems while using such packages, please request support from the third party provider. We strongly recommend that you first check whether an application is available in the official repositories and if it is, use that package, even if it is not the absolute latest version of the application. Having the latest (perhaps broken) version is not as important as have a package that works. People spent time to check that applications in the official repositories work, and if you find problems, they can be reported to Bugzilla and corrected for everyone. If you need the latest version, it may (or may not for good reasons) be available as a backport, but do not count on it: begin with what's available and enjoy.
[edit] Rebuilding a source RPM from a later Mandriva Linux release
If the package or version you require is not available from an official or third party repository for your release of Mandriva Linux, but is available in a later release of Mandriva Linux (including Cooker), you may try to recompile the source RPM from the later release on your release. You will be able to find the source RPM on any official Mandriva mirror, in the /SRPMS subdirectory of the release where the package is available. To build a source RPM, follow the instructions in the RPM building HOWTO: you will need to complete the steps in 'Preliminary tasks', and then follow the instructions in 'From an existing source RPM'.
[edit] Installing from source code
If the application or version you require is not available from any official or third party repository, you may be forced to install it by downloading the raw source code, compiling it, and installing it to your system. This is the least preferred method of installing software and should only be used if you have no other option. For details on the general procedure of installing applications from source code on Mandriva Linux, please see this page.