Installing and removing software

From Mandriva Community Wiki

Jump to: navigation, search
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. 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 tool, which is called rpmdrake, and the software update tool, which is called MandrivaUpdate.

Contents

Installing and removing software

Image:drakrpm-icon.png drakrpm (or 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 Star/Application menu > Install & Remove Software
  • From the Mandriva Control Center : Star 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.

Install & Remove Software Meta-package Selection

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 rio bouygues rio orange 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.

Remove Software Selection

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. Also note the color-coded icons in the far right column of the file window labeled "Status". These icons represent the selected-for-installation, installed, or to-be-removed status of packages.

To remove software that has already been installed, uncheck the box in the left-hand column of the package listing window 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.

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.

Note about kernel updates

When the kernel is updated you will see more boot entries in GRUB, the boot loader, menu, that's because kernels are installed in parallel, i.e. a new kernel isn't going to replace an old one.

The entries on the GRUB menu will change when a new kernel is installed as follows:

  • The default entry Boot Mandriva Linux... will always boot the last installed kernel
  • A separate entry will be created for the old kernel
  • Another separate entry will be created for the new kernel

This is a fail-safe measure as a new kernel mightn't boot for one reason or another, in that case you can always boot the system using the old kernel, to investigate/fix why the new one doesn't work. Once you're satisfied that the new kernel works correctly, you can safely uninstall the older one(s); kernels are rpm packages so uninstall them using the GUI, rpmdrake (aka "install & remove software") or urpme from terminal, uninstalling a kernel will automatically remove its entry from the GRUB menu.

Making more applications available

Introduction

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 gain access to 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 (aka Install & Remove Software), 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. Also if you install Mandriva using the Live One CD edition these repositories will be added automatically when you boot the installed system for the first time if there's an active internet connection available.

N.B. Starting from the upcoming 2010.1 release and to comply with the idea that the Free Edition, DVD and free-dual CD, only contain free-open-source-software, when setting up the online media sources in Free Edition installs, the Non-free media sources are added, but disabled by default. For more information see Image:bug_small.png Bug #40033.

You can easily enable the Non-free media sources from the Mandriva Control Center Image:Drakconf-icon.png > Software Management > Configure media sources for install and update, basically you'd need to enable the Non-free and Non-free Updates repositories.

Do you have the online software repositories set up correctly?

You can find out if you have the online repositories set up correctly by looking in Mandriva Control Centre Image:Drakconf-icon.png -> Software Management -> Configure media sources for install and update, or using this command: urpmq --list-media active ideally you should at least have these (the previous urpmq command lists only enabled repositories so you will see more media sources listed in 'Configure media sources for install and update' but not activated by default, this is normal): Main Main Updates Contrib Contrib Updates Non-free Non-free Updates

Setting up the online sources

If you don't have the above repositories then you can add them manually by following these steps:

  1. Open the Mandriva Control Centre Image:Drakconf-icon.png -> Software Management -> 'Configure media sources for install and update'.
  2. Now click the Add button on the right hand side.
  3. When asked select Full set of sources in the pop-up window that appears.
  4. Click 'yes' when asked if it is OK to contact the Mandriva web site to retrieve the mirror list.

Once the process is complete, you can run rpmdrake as described above, and you will have access to a wider range of applications.

Adding a specific Media Mirror

Using the above method will add the repos using the MIRRORLIST, it doesn't add a single mirror but uses a dynamic way to switch between mirrors depending on:

  • which mirrors are geographically closer to you and
  • which mirrors are faster as the default downloader, aria2, is configured to check for a minimum speed limit

Also using the MIRRORLIST, it downloads, if possible, the same file from three different servers at the same time.

If you're having trouble using with the MIRRORLIST (e.g. it defaults to a slow or faulty mirror) you can still add a specific media mirror, usually you manually pick up a mirror you know from past experience to be reliable and reasonably up-to-date.

To do so follow these steps:

  1. Open the Mandriva Control Centre Image:Drakconf-icon.png -> Software Management -> Configure media sources for install and update
  2. Now open File -> Add a specific media mirror
  3. When asked select Full set of sources in the pop-up window that appears.
  4. Click 'yes' when asked if it is OK to contact the Mandriva website to retrieve the mirror list
  5. When the mirror list appears, choose a mirror close to your geographical location (or a mirror you know is reliable).

that's it, you've just added a specific media mirror.

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:

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.

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.

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.

For 2009.0 installations urpmq behaves slightly different that previous versions to keep it familiar you can alias it like this:

alias urpmq='urpmq -a'

urpmscan and urpmseek: Searching for packages Debian-alike

Create a file called urpmscan with the following content and move it to /usr/bin

#! /bin/bash
urpmf -i  --uniq --description "$1"    | grep  '^[[:alnum:]].*:$' | sed s/\:// | sort

Then,

chmod 755 /usr/bin/urpmscan

Example:

urpmscan streaming

urpmseek:

echo alias urpmseek\=\"urpmf -i --summary\" >> /etc/bashrc

Example:

bash

And then:

urpmseek streaming

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 mirrors list and the community maintained EasyUrpmi site are two of the most commonly used.

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 the Software Media Policy.

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!
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.

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.

Caution !
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.

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.

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'.

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.

Personal tools