Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install a package (e.g. python-mysqldb) and when I try to do a yum install, I get a message that "No package python-mysqldb avaialble". I assume this is because the yum repository set up on my RHEL box does not contain this package. So I have two questions:

  1. How do I configure yum to look in other repositories?

  2. How do I locate the repository that has the package I want to install?

share|improve this question
up vote 5 down vote accepted

To add a repository you need to add the key for the repository then install the repository. For this example I will use the El Repo since it has the commands you need to run:

First you need to import the key using rpm --import:

rpm --import

Then you run rpm with the -Uvh switch to isntall the repo (there are two installations depending on what version of CentOS/RHEL your using).

RHEL 5/CentOS 5

rpm -Uvh

RHEL 6/CentOS 6

rpm -Uvh

The error your getting is showing that particular package doesn't exist. If you found on the internet that the package should be available you might want to inquire what type of repository is required to download it. It seems you just want Python and MySQL to be available. I think that MySQL is available with the default repositories.

Install MySQL & PHP:

 yum install mysql-server mysql php-mysql

Install Python:

 yum install python26

For python26 you will need the EPEL repository:

The above links should be able to help you with getting the required repository for Python.

In general, you can also use RPM search engines to look for specific packages, download and install them using rpm -ivh downloaded_package.rpm. Some of the better known ones are:

share|improve this answer
Thank you for the contribution terdon! – Dion Pezzimenti Mar 28 '13 at 17:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .