Q. 1: What is this?

A. A yum faq.

Q. 2: Where do I find a repository to update my system which is running distribution <XYZ>?

A. We have no idea. Your distribution should maintain their own list on this subject. If they don't support yum but you want to use it anyway you are probably going to have to make your own repository.

Q. 3: How do I upgrade my machine from release X to release Y?

A. We have little idea. If you are using Fedora, check out this guide written by Fedora Developers and Contributors. If you are using something else, try looking at their docs or asking on their mailing lists.

Q. 4: How can I get yum to keep package "foo" at a certain version in a fashion similar to pinning provided by apt?

A. There are several ways you can do this.

  • One is to exclude it from your updates list. See man yum.conf for more details.
  • Another way to pin package "foo" to a certain version is to use the versionlock plugin.

If you are using the latest Fedora (12) then the plugin can be installed using:

yum install yum-plugin-versionlock

To add files that you want version locked, use the following yum command:

yum versionlock <package-name>

you can also use wildcards:

yum versionlock <package-name>-*

This command line will add lines to:


The config file uses the following format: EPOCH:NAME-VERSION-RELEASE.ARCH which can be obtained using:

rpm -q <package name> --queryformat "%{EPOCH}:%{NAME}-%{VERSION}-%{RELEASE}\n "

If no EPOCH is specified in the package, then the number will be 0.

Alternatively if you are using Redhat 5.4/Centos 5.4 or another OS that does not yet have the latest yum available you can use:

yum install yum-versionlock

This older version of the plug-in does not extend command line flags that you can pass to yum and the lock list must be edited manually.

For a manual install the source can be obtained from the current git repository for yum which is http://yum.baseurl.org/gitweb The files you need will be found in the yum-utils/plugins/versionlock part of the git tree. Copy versionlock.py to /usr/lib/yum-plugins/versionlock.py Copy versionlock.conf to /etc/yum/pluginconf.d/versionlock.conf Create /etc/yum/pluginconf.d/versionlock.list All files should be root.root with 644 permissions.

Q. 5: I get an "[Errno -1] Header is not complete." error from yum - what the heck is going on?

A. It's probably a proxy somewhere between you and the repository. You may not think that a proxy is in the way even though it really is.

You can try doing a "trace" with this command:

echo -e "TRACE / HTTP/1.1\nHost:  yum-server.example.com\n\n"  | nc yum-server.example.com 80

Which should give you some more information about the network between you and the repository. Also, be sure to replace yum-server.example.com with whatever your yum repository server is.

Another diagnosis step is to get the box off of that network (not always entirely possible, but port forwarding, VPN, or dialup can simulate the experience) and see if you still have the problem.

The solutions to this problem are:

  1. Get your proxy software/firmware updated so that it properly implements HTTP 1.1
  2. Use an FTP repository, where byte ranges are more commonly supported by the proxy
  3. Create a local mirror with rsync and then point your yum.conf to that local mirror
  4. Don't use yum

Q. 6: I'm upgrading and I get "Error: Missing Dependency:" messages like "Error: Missing Dependency: libgcj.so.5 is needed by package junit" and then yum quits. What should I do?

A. yum is trying to tell you that some packages that are being replaced or obsoleted are needed by an installed package, so yum can't do it's work. To interpret the example, the installed junit package requires libgcj.so.5 and libgcj.so.5 is being updated or obsoleted so junit would no longer work if yum updated the libgcj.so.5 package.

One relatively easy way to fix this is to remove whatever package "needs" the packages that are about to be upgraded/obsoleted and then reinstall that package after you have upgraded everything else. In the example, remove junit, upgrade, then reinstall junit.

Another solution is to find a repository that provides an upgraded of the package that "needs" the old packages and add it to your yum configuration. Hopefully the new version of that package will have dependencies on the upgraded package, in our case libgcj.so.5, and yum will take care of everything.

For more details, see this post by Garrick Staples

Q. 7: I installed a new version of yum (or upgraded my whole system) and now when I run yum, I get an error saying "The yum libraries do not seem to be available on your system for this version of python" and "Please make sure the package you used to install yum was built for your install of python." What's wrong with the yum package I've got, or my Python installation, and how do I fix it?


In pre-2.3.? yum This error message is often misleading. To see the real error, run python from the command line, and type import yum. The problem probably isn't with your version of python at all, but with a missing libxml2-python, python-sqlite, or python-elementtree package.

Yum 2.4.x provides a different error with the module import errors, so this will become less confusing.

It also includes a directive to send the error to the mailing list. Really, you should figure out what rpm provides the module that was missing and try to install that.

If you are getting a message that yum itself is the missing module then you probably installed it incorreclty (or installed the source rpm using make/make install). If possible, find a prebuilt rpm that will work for your system like one from Fedora or CentOS. Or, you can download the srpm and do a

rpmbuild --rebuild yum*.src.rpm

Q. 8: Yum is very nice at updating my kernel, but I use the (nvidia | openafs | other module) and yum doesn't seem to handle it well. Could you fix yum to handle this for me?

A. This is a known and non-trivial problem, but people are talking and working on it. Please read ideas on this plugin and messages from the Google search of the yum archives to get more details.

Q. 9: How does yum handle updates/installs on x86_64 machines?

A. There are times when it is beneficial to have both 32 and 64 bit versions of a package installed on a machine such as when another package only has a 32bit version and needs to access 32bit libraries of something that you would normally only install the 64bit package. So, if you do "yum install foo" then you will get both foo.i386.rpm and foo.x86_64.rpm installed on your system. This is the desired behavior in most cases even if it takes up more disk space. If you do a "yum install foo.x86_64" then you will only get the x86_64 package.

Q. 10: How can I search the mailing list archives?

A. One easy way is to use the google site: keyword pointed at the server for the mailing list thusly. Of course, you should replace "your_search_term" in that example to your search term.

Q. 11: How can I create a yum repository?

A. First, are you sure you want to create a repository and not just mirror an existing one? If all you want is a mirrored local copy of someone else's repository, just make sure that your rsync script (or whatever mirroring process you are using) includes the repodata directory from the mirror's source.

If you really want to make your own yum repository, the command depends on the version of yum that you are going to use with this repository, but the method is basically the same.

for 2.0.X or earlier:
yum-arch /path/to/where/you/want/the/repo/made

for 2.2.x or later:
createrepo /path/to/where/you/want/the/repo/made

You may also be served by reading http://createrepo.baseurl.org/ and even searching the yum list archives as described in question 10

Q. 12: How can I get help?

A. Well, you're on this page so that's a start. And you've already passed most of the technical faqs and the advice on using Google to search the mailing list. If you've made it this far and haven't solved your problem you should know about the support options. Basically, ask questions on the mailing list and file bugs in trac

Q. 13: If the most recent version of a package is available in multiple repositories, how can I instruct yum to consistently pull it from a specific repository? Stated differently, how can I give priority to a certain mirror or my local repositories?

A. yum will get the package from the repository listed first in the yum.conf file. You can read more in this explanation.

Q. 14: How can I tell yum to download a source package (i.e., a .src.rpm file)?

A. The main yum program doesn't do this -- it's not within the scope of the program's design goals. But, since it's a very useful function, the yumdownloader program from the yum-utils package is available for doing this very thing. Simply run something like: {{{

yumdownloader --source yum

}}} and you'll get the yum src.rpm in your current directory.

In order to keep yum's interface (and internal code) clean and straightforward, this will not be added to yum proper. And yumdownloader works well.

Q. 15: I'm behind a Microsoft proxy using NTLM authentication. What can I do?

A. Some people have had luck using the NTLM APS project.

Q. 16: Can yum downgrade packages?

A. Downgrades are tricky but in yum versions 3.2.27 and above it can do _some_ downgrades. They are not perfect and should be

used with care.

Q. 17: Why does yum always seem to update the metadata on EVERY run?

A. It doesn't. It updates to check the metadata any time the cache timeout has been hit. The default can be set in your /etc/yum.conf file and per repository config. see the yum man page and look for the metadata_expire value for how to set it to a different value.

Q. 18: How does yum determine which pkg to install for a dependency if more than one pkg provides a dependency?

A. See the CompareProviders wiki page for more detailed information.

Q. 19: What's the yum equivalent for rpm --nodeps --force?

A. See the NoDeps wiki page for more detailed information.