Changes from Version 1 of Faq

Show
Ignore:
Author:
skvidal (IP: 24.211.246.61)
Timestamp:
09/26/08 16:59:18 (9 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Faq

    v0 v1  
     1= Faq = 
     2 
     3===== Q. 1: What is this? ===== 
     4 
     5'''A.''' A yum faq. 
     6----  
     7 
     8===== Q. 2: Where do I find a repository to update my system which is running distribution <XYZ>? ===== 
     9 
     10'''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. 
     11----  
     12 
     13===== Q. 3: How do I upgrade my machine from release X to release Y? ===== 
     14 
     15'''A.''' We have little idea.  If you are using Fedora, check out [http://fedoraproject.org/wiki/YumUpgradeFaq 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. 
     16 
     17----  
     18 
     19===== Q. 4: How can I get yum to keep package "foo" at a certain version in a fashion similar to pinning provided by apt? ===== 
     20 
     21'''A.''' There are several ways you can do this.   
     22 
     23 * One is to exclude it from your updates list (see man yum.conf or http://wiki.linux.duke.edu/ManYumConf)   
     24 
     25 * Another way is to use the versionlock plugin to yum which performs a similar function.  See [https://lists.dulug.duke.edu/pipermail/yum/2005-August/007194.html this post from Panu Matilainen] for more details. 
     26 
     27 
     28----  
     29 
     30===== Q. 5: I get an "[Errno -1] Header is not complete." error from yum - what the heck is going on? ===== 
     31 
     32'''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. 
     33 
     34You can try doing a "trace" with this command: 
     35 
     36echo -e "TRACE / HTTP/1.1\nHost:  yum-server.example.com\n\n"  | nc yum-server.example.com 80 
     37 
     38Which 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.   
     39 
     40Another 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. 
     41 
     42The solutions to this problem are: 
     43 
     44 1. Get your proxy software/firmware updated so that it properly implements HTTP 1.1 
     45 2. Use an FTP repository, where byte ranges are more commonly supported by the proxy 
     46 3. Create a local mirror with rsync and then point your yum.conf to that local mirror 
     47 4. Don't use yum 
     48 
     49----  
     50 
     51===== 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? ===== 
     52 
     53'''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.   
     54 
     55One 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.   
     56 
     57Another 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. 
     58 
     59For more details, see [https://lists.dulug.duke.edu/pipermail/yum/2005-July/006994.html this post by Garrick Staples] 
     60 
     61---- 
     62 
     63===== 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? ===== 
     64 
     65'''A.'''  
     66 
     67In 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. 
     68 
     69Yum 2.4.x provides a different error with the module import errors, so this will become less confusing.   
     70 
     71It 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.   
     72 
     73If 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  
     74 
     75rpmbuild --rebuild yum*.src.rpm 
     76 
     77----  
     78 
     79===== 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? ===== 
     80 
     81'''A.''' This is a known and non-trivial problem, but people are talking and working on it.  Please read ideas on [https://lists.dulug.duke.edu/pipermail/yum-devel/2005-June/thread.html#1232 this plugin] and messages from [http://www.google.com/search?q=yum+kernel+module+site:lists.dulug.duke.edu&num=20&hl=en&lr=&start=20&sa=N the Google search of the yum archives] to get more details. 
     82 
     83----  
     84 
     85 
     86===== Q. 9: How does yum handle updates/installs on x86_64 machines? ===== 
     87 
     88'''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. 
     89 
     90----  
     91 
     92 
     93 
     94===== Q. 10: How can I search the mailing list archives? ===== 
     95 
     96'''A.''' One easy way is to use the google site: keyword pointed at the server for the mailing list [http://www.google.com/search?num=20&hl=en&lr=&q=your_search_term+site%3Alists.dulug.duke.edu&btnG=Search thusly.]  Of course, you should replace "your_search_term" in that example to your search term. 
     97 
     98---- 
     99 
     100===== Q. 11: How can I create a yum repository? ===== 
     101 
     102'''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. 
     103 
     104If 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. 
     105 
     106for 2.0.X or earlier:[[BR]] 
     107yum-arch /path/to/where/you/want/the/repo/made 
     108 
     109for 2.2.x or later:[[BR]] 
     110createrepo /path/to/where/you/want/the/repo/made 
     111 
     112You may also be served by reading [http://linux.duke.edu/projects/metadata/] and even searching the yum list archives [http://wiki.linux.duke.edu/YumFaq#Q10 as described in question 10]. 
     113 
     114Note that you do not need yum to create a repo for 2.2.x or later.  You can use the createrepo package available from a variety of places including the Duke Metadata link given above or available from places like Dag's repository. 
     115 
     116---- 
     117 
     118 
     119 
     120===== Q. 12: How can I get help? ===== 
     121 
     122'''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 [http://wiki.linux.duke.edu/YumFaq#Q10 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 [http://linux.duke.edu/projects/yum/support.ptml support options.]  Basically, ask questions on the [https://lists.dulug.duke.edu/mailman/listinfo/yum mailing list] and file bugs in [https://devel.linux.duke.edu/bugzilla the bugzilla]. 
     123 
     124----  
     125 
     126===== 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? ===== 
     127 
     128'''A.''' yum will get the package from the repository listed first in the yum.conf file.  You can read more in [https://lists.dulug.duke.edu/pipermail/yum/2005-May/006564.html this explanation.] 
     129 
     130---- 
     131 
     132===== Q. 14: How can I tell yum to download a source package (i.e., a .src.rpm file)? ===== 
     133 
     134'''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: {{{ 
     135  yumdownloader --source yum 
     136}}} 
     137and you'll get the yum src.rpm in your current directory. 
     138 
     139In order to keep yum's interface (and internal code) clean and straightforward, this will not be added to yum proper. And yumdownloader works well. 
     140---- 
     141 
     142 
     143===== Q. 15: I'm behind a Microsoft proxy using NTLM authentication.  What can I do? ===== 
     144'''A.''' Some people have had luck using [http://ntlmaps.sourceforge.net/ the NTLM APS project]. 
     145---- 
     146