I need to install mercurial on my opensuse but I couldn't find the rpm so I just download mercurial.rpm and wanted to install it by using:

sudo zypper ...

but it said to need python 2.6 so I downloaded python 2.6.0 and did the same but it said that needs the previous versions and the process failed.

2 Answers 2


Modern Linux distributions include a package manager to resolve dependencies and provide a repository with software packages, thus avoid problems like you've just encountered.

On openSUSE you generally have a choice of methods to install a .rpm package. Either on the command-line with zypper, yast, (if available yum) or over the graphical frontend YaST.
Note, that you have to append sudo to the following commands, or issue them as root.


zypper install python mercurial


yum install python mercurial


yast provides an interactive console based GUI on which you can search and install software packages.

If you have a graphical frontend, you can also find YaST as a GUI in the menu.

All those package managers include the capability of searching for packages, so the next time you need one, use yast or the command search.
As an example:

zypper search perl

will search and display all available perl packages.

If you just want to install one (or more) locally available .rpm packages, you can simply use the given tool rpm.

rpm -i mercurial-1.5-3.1.x86_64.rpm

As you already saw, this will only work if all the dependencies are already installed.

See here for more information about package management on openSUSE.

  • thanks for your commands which are really helpful for me but as I explained above I need another way to install python so would you please tell me if I can install python like a software not by packages?
    – bahar
    Jan 21, 2011 at 10:07

Check if you have yum installed by typing yum --version in your terminal prompt. If you get something with a version number then you have it installed.

sudo yum install python - should install python.

Likewise, sudo yum install mercurial - should install mercurial.

EDIT-1: In case if you are not comfortable with command line method, open up the package manager and search for both of them and install it that way. My guess is you don't have to download the rpm and install python or mercurial. It should be available with the distro package manager itself.

EDIT-2: If you want to search for a package use - yum search <insert-package-name-here>. If you don't know the full package name you can just use a part of the package name.

Other command is yum whatprovides <package-name>. For more commands refer here and here.

  • thanks for all your advices but the problem is that the version of my opensuse is 10.2 nad its python is 2.2 and doesn't have any mercurial package (I followed exactly your commands) so I need to add this package and also I couldn't find anything name package management .
    – bahar
    Jan 21, 2011 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy