Changeset 516 for yum/trunk/FAQ


Ignore:
Timestamp:
Feb 3, 2015, 9:39:54 AM (11 years ago)
Author:
Yuri Dario
Message:

yum: update trunk to 3.4.3.

Location:
yum/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • yum/trunk

  • yum/trunk/FAQ

    r2 r516  
    66----
    77
    8 ===== Q. 2: Where do I find a repository to update my system which is running d
    9 istribution <XYZ>? =====
    10 
    11 '''A.''' We have no idea.  Your distribution should maintain their own list on
    12 this subject.  If they don't support yum but you want to use it anyway you are
    13 probably going to have to make your own repository.
     8===== Q. 2: Where do I find a repository to update my system which is running di
     9stribution <XYZ>? =====
     10
     11'''A.''' We have no idea.  Your distribution should maintain their own list on t
     12his subject.  If they don't support yum but you want to use it anyway you are pr
     13obably going to have to make your own repository.
    1414----
    1515
    1616===== Q. 3: How do I upgrade my machine from release X to release Y? =====
    1717
    18 '''A.''' We have little idea.  If you are using Fedora, check out [http://fedor
    19 aproject.org/wiki/YumUpgradeFaq this guide written by Fedora Developers and Con
    20 tributors].  If you are using something else, try looking at their docs or aski
    21 ng on their mailing lists.
    22 
    23 ----
    24 
    25 ===== Q. 4: How can I get yum to keep package "foo" at a certain version in a f
    26 ashion similar to pinning provided by apt? =====
     18'''A.''' We have little idea.  If you are using Fedora, check out [http://fedora
     19project.org/wiki/YumUpgradeFaq this guide written by Fedora Developers and Contr
     20ibutors].  If you are using something else, try looking at their docs or asking
     21on their mailing lists.
     22
     23----
     24
     25===== Q. 4: How can I get yum to keep package "foo" at a certain version in a fa
     26shion similar to pinning provided by apt? =====
    2727
    2828'''A.''' There are several ways you can do this.
    2929
    30  * One is to exclude it from your updates list. See man yum.conf for more detai
    31 ls.
    32 
    33  * Another way to pin package "foo" to a certain version is to use the versionl
    34 ock plugin.
     30 * One is to exclude it from your updates list. See man yum.conf for more detail
     31s.
     32
     33 * Another way to pin package "foo" to a certain version is to use the versionlo
     34ck plugin.
    3535
    3636If you are using the latest Fedora (12) then the plugin can be installed using:
    37 
    3837{{{
    3938yum install yum-plugin-versionlock
     
    7372yum install yum-versionlock
    7473}}}
    75 This older version of the plug-in does not extend command line flags that you c
    76 an pass to yum and the lock list must be edited manually.
     74This older version of the plug-in does not extend command line flags that you ca
     75n pass to yum and the lock list must be edited manually.
    7776
    7877For a manual install the source can be obtained from the current git
     
    9089
    9190===== Q. 5: I get an "[Errno -1] Header is not complete." error from yum - what
    92  the heck is going on? =====
    93 
    94 '''A.''' It's probably a proxy somewhere between you and the repository.  You m
    95 ay not think that a proxy is in the way even though it really is.
     91the heck is going on? =====
     92
     93'''A.''' It's probably a proxy somewhere between you and the repository.  You ma
     94y not think that a proxy is in the way even though it really is.
    9695
    9796You can try doing a "trace" with this command:
    9897{{{
    99 echo -e "TRACE / HTTP/1.1\nHost:  yum-server.example.com\n\n"  | nc yum-server.
    100 example.com 80
    101 }}}
    102 Which should give you some more information about the network between you and t
    103 he repository.  Also, be sure to replace yum-server.example.com with whatever y
    104 our yum repository server is.
    105 
    106 Another diagnosis step is to get the box off of that network (not always entire
    107 ly possible, but port forwarding, VPN, or dialup can simulate the experience) a
    108 nd see if you still have the problem.
     98echo -e "TRACE / HTTP/1.1\nHost:  yum-server.example.com\n\n"  | nc yum-server.e
     99xample.com 80
     100}}}
     101Which should give you some more information about the network between you and th
     102e repository.  Also, be sure to replace yum-server.example.com with whatever you
     103r yum repository server is.
     104
     105Another diagnosis step is to get the box off of that network (not always entirel
     106y possible, but port forwarding, VPN, or dialup can simulate the experience) and
     107 see if you still have the problem.
    109108
    110109The solutions to this problem are:
    111110
    112  1. Get your proxy software/firmware updated so that it properly implements HTT
    113 P 1.1
     111 1. Get your proxy software/firmware updated so that it properly implements HTTP
     112 1.1
    114113 2. Use an FTP repository, where byte ranges are more commonly supported by the
    115  proxy
     114proxy
    116115 3. Create a local mirror with rsync and then point your yum.conf to that local
    117  mirror
     116mirror
    118117 4. Don't use yum
    119118
    120119----
    121120
    122 ===== Q. 6: I'm upgrading and I get "Error: Missing Dependency:" messages like
    123 "Error: Missing Dependency: libgcj.so.5 is needed by package junit" and then yu
    124 m quits.  What should I do? =====
    125 
    126 '''A.''' yum is trying to tell you that some packages that are being replaced o
    127 r obsoleted are needed by an installed package, so yum can't do it's work.  To
    128 interpret the example, the installed junit package requires libgcj.so.5 and lib
    129 gcj.so.5 is being updated or obsoleted so junit would no longer work if yum upd
    130 ated the libgcj.so.5 package.
    131 
    132 One relatively easy way to fix this is to remove whatever package "needs" the p
    133 ackages that are about to be upgraded/obsoleted and then reinstall that package
    134  after you have upgraded everything else.  In the example, remove junit, upgrad
    135 e, then reinstall junit.
    136 
    137 Another solution is to find a repository that provides an upgraded of the packa
    138 ge that "needs" the old packages and add it to your yum configuration.  Hopeful
    139 ly the new version of that package will have dependencies on the upgraded packa
    140 ge, in our case libgcj.so.5, and yum will take care of everything.
    141 
    142 For more details, see [https://lists.dulug.duke.edu/pipermail/yum/2005-July/006
    143 994.html this post by Garrick Staples]
    144 
    145 ----
    146 
    147 ===== Q. 7: I installed a new version of yum (or upgraded my whole system) and
    148 now when I run yum, I get an error saying "The yum libraries do not seem to be
    149 available on your system for this version of python" and "Please make sure the
    150 package you used to install yum was built for your install of python." What's w
    151 rong with the yum package I've got, or my Python installation, and how do I fix
    152  it? =====
     121===== Q. 6: I'm upgrading and I get "Error: Missing Dependency:" messages like "
     122Error: Missing Dependency: libgcj.so.5 is needed by package junit" and then yum
     123quits.  What should I do? =====
     124
     125'''A.''' yum is trying to tell you that some packages that are being replaced or
     126 obsoleted are needed by an installed package, so yum can't do it's work.  To in
     127terpret the example, the installed junit package requires libgcj.so.5 and libgcj
     128.so.5 is being updated or obsoleted so junit would no longer work if yum updated
     129 the libgcj.so.5 package.
     130
     131One relatively easy way to fix this is to remove whatever package "needs" the pa
     132ckages that are about to be upgraded/obsoleted and then reinstall that package a
     133fter you have upgraded everything else.  In the example, remove junit, upgrade,
     134then reinstall junit.
     135
     136Another solution is to find a repository that provides an upgraded of the packag
     137e that "needs" the old packages and add it to your yum configuration.  Hopefully
     138 the new version of that package will have dependencies on the upgraded package,
     139 in our case libgcj.so.5, and yum will take care of everything.
     140
     141For more details, see [http://lists.baseurl.org/pipermail/yum/2005-July/018079.h
     142tml this post by Garrick Staples]
     143
     144----
     145
     146===== Q. 7: I installed a new version of yum (or upgraded my whole system) and n
     147ow when I run yum, I get an error saying "The yum libraries do not seem to be av
     148ailable on your system for this version of python" and "Please make sure the pac
     149kage you used to install yum was built for your install of python." What's wrong
     150 with the yum package I've got, or my Python installation, and how do I fix it?
     151=====
    153152
    154153'''A.'''
    155154
    156 In pre-2.3.? yum  This error message is often misleading. To see the real error
    157 , run `python` from the command line, and type `import yum`. The problem probab
    158 ly isn't with your version of python at all, but with a missing libxml2-python,
    159  python-sqlite, or python-elementtree package.
    160 
    161 Yum 2.4.x provides a different error with the module import errors, so this wil
    162 l become less confusing.
    163 
    164 It also includes a directive to send the error to the mailing list.  Really, yo
    165 u should figure out what rpm provides the module that was missing and try to in
    166 stall that.
    167 
    168 If you are getting a message that yum itself is the missing module then you pro
    169 bably installed it incorreclty (or installed the source rpm using make/make ins
    170 tall).  If possible, find a prebuilt rpm that will work for your system like on
    171 e from Fedora or CentOS.  Or, you can download the srpm and do a
     155In pre-2.3.? yum  This error message is often misleading. To see the real error,
     156 run `python` from the command line, and type `import yum`. The problem probably
     157 isn't with your version of python at all, but with a missing libxml2-python, py
     158thon-sqlite, or python-elementtree package.
     159
     160Yum 2.4.x provides a different error with the module import errors, so this will
     161 become less confusing.
     162
     163It also includes a directive to send the error to the mailing list.  Really, you
     164 should figure out what rpm provides the module that was missing and try to inst
     165all that.
     166
     167If you are getting a message that yum itself is the missing module then you prob
     168ably installed it incorreclty (or installed the source rpm using make/make insta
     169ll).  If possible, find a prebuilt rpm that will work for your system like one f
     170rom Fedora or CentOS.  Or, you can download the srpm and do a
    172171
    173172rpmbuild --rebuild yum*.src.rpm
     
    175174----
    176175
    177 ===== Q. 8: Yum is very nice at updating my kernel, but I use the (nvidia | ope
    178 nafs | other module) and yum doesn't seem to handle it well.  Could you fix yum
    179  to handle this for me? =====
    180 
    181 '''A.''' This is a known and non-trivial problem, but people are talking and wo
    182 rking on it.  Please read ideas on [https://lists.dulug.duke.edu/pipermail/yum-
    183 devel/2005-June/thread.html#1232 this plugin] and messages from [http://www.goo
    184 gle.com/search?q=yum+kernel+module+site:lists.dulug.duke.edu&num=20&hl=en&lr=&s
    185 tart=20&sa=N the Google search of the yum archives] to get more details.
     176===== Q. 8: Yum is very nice at updating my kernel, but I use the (nvidia | open
     177afs | other module) and yum doesn't seem to handle it well.  Could you fix yum t
     178o handle this for me? =====
     179
     180'''A.''' This is a known and non-trivial problem, but people are talking and wor
     181king on it.  Please read ideas on [http://lists.baseurl.org/pipermail/yum-devel/
     1822005-June/thread.html#1232 this plugin] and messages from [http://www.google.com
     183/search?q=yum+kernel+module+site:lists.baseurl.org&num=20&hl=en&lr=&start=20&sa=
     184N the Google search of the yum archives] to get more details.
    186185
    187186----
     
    190189===== Q. 9: How does yum handle updates/installs on x86_64 machines? =====
    191190
    192 '''A.''' There are times when it is beneficial to have both 32 and 64 bit versi
    193 ons of a package installed on a machine such as when another package only has a
    194  32bit version and needs to access 32bit libraries of something that you would
    195 normally only install the 64bit package.  So, if you do "yum install foo" then
    196 you will get both foo.i386.rpm and foo.x86_64.rpm installed on your system.  Th
    197 is is the desired behavior in most cases even if it takes up more disk space.
    198 If you do a "yum install foo.x86_64" then you will only get the x86_64 package.
     191'''A.''' There are times when it is beneficial to have both 32 and 64 bit versio
     192ns of a package installed on a machine such as when another package only has a 3
     1932bit version and needs to access 32bit libraries of something that you would nor
     194mally only install the 64bit package.  So, if you do "yum install foo" then you
     195will get both foo.i386.rpm and foo.x86_64.rpm installed on your system.  This is
     196 the desired behavior in most cases even if it takes up more disk space.  If you
     197 do a "yum install foo.x86_64" then you will only get the x86_64 package.
    199198
    200199----
     
    204203===== Q. 10: How can I search the mailing list archives? =====
    205204
    206 '''A.''' One easy way is to use the google site: keyword pointed at the server
    207 for the mailing list [http://www.google.com/search?num=20&hl=en&lr=&q=your_sear
    208 ch_term+site%3Alists.dulug.duke.edu&btnG=Search thusly.]  Of course, you should
    209  replace "your_search_term" in that example to your search term.
     205'''A.''' One easy way is to use the google site: keyword pointed at the server f
     206or the mailing list [http://www.google.com/search?num=20&hl=en&lr=&q=your_search
     207_term+site%3Alists.baseurl.org&btnG=Search thusly.]  Of course, you should repla
     208ce "your_search_term" in that example to your search term.
    210209
    211210----
     
    213212===== Q. 11: How can I create a yum repository? =====
    214213
    215 '''A.''' First, are you sure you want to create a repository and not just mirro
    216 r an existing one?  If all you want is a mirrored local copy of someone else's
    217 repository, just make sure that your rsync script (or whatever mirroring proces
    218 s you are using) includes the repodata directory from the mirror's source.
    219 
    220 If you really want to make your own yum repository, the command depends on the
    221 version of yum that you are going to use with this repository, but the method i
    222 s basically the same.
     214'''A.''' First, are you sure you want to create a repository and not just mirror
     215 an existing one?  If all you want is a mirrored local copy of someone else's re
     216pository, just make sure that your rsync script (or whatever mirroring process y
     217ou are using) includes the repodata directory from the mirror's source.
     218
     219If you really want to make your own yum repository, the command depends on the v
     220ersion of yum that you are going to use with this repository, but the method is
     221basically the same.
    223222
    224223for 2.0.X or earlier:[[BR]]
     
    228227createrepo /path/to/where/you/want/the/repo/made
    229228
    230 You may also be served by reading [http://linux.duke.edu/projects/metadata/] an
    231 d even searching the yum list archives [http://wiki.linux.duke.edu/YumFaq#Q10 a
    232 s described in question 10].
    233 
    234 Note that you do not need yum to create a repo for 2.2.x or later.  You can use
    235  the createrepo package available from a variety of places including the Duke M
    236 etadata link given above or available from places like Dag's repository.
     229You may also be served by reading [http://createrepo.baseurl.org/] and even sear
     230ching the yum list archives as described in question 10
     231
    237232
    238233----
     
    242237===== Q. 12: How can I get help? =====
    243238
    244 '''A.''' Well, you're on this page so that's a start.  And you've already passe
    245 d most of the technical faqs and the advice on [http://wiki.linux.duke.edu/YumF
    246 aq#Q10 using Google to search the mailing list]. If you've made it this far and
    247  haven't solved your problem you should know about the [http://linux.duke.edu/p
    248 rojects/yum/support.ptml support options.]  Basically, ask questions on the [ht
    249 tps://lists.dulug.duke.edu/mailman/listinfo/yum mailing list] and file bugs in
    250 [https://devel.linux.duke.edu/bugzilla the bugzilla].
    251 
    252 ----
    253 
    254 ===== Q. 13: If the most recent version of a package is available in multiple r
    255 epositories, how can I instruct yum to consistently pull it from a specific rep
    256 ository?  Stated differently, how can I give priority to a certain mirror or my
    257  local repositories? =====
    258 
    259 '''A.''' yum will get the package from the repository listed first in the yum.c
    260 onf file.  You can read more in [https://lists.dulug.duke.edu/pipermail/yum/200
    261 5-May/006564.html this explanation.]
    262 
    263 ----
    264 
    265 ===== Q. 14: How can I tell yum to download a source package (i.e., a .src.rpm
    266 file)? =====
    267 
    268 '''A.''' The main yum program doesn't do this -- it's not within the scope of t
    269 he program's design goals. But, since it's a very useful function, the {{{yumdo
    270 wnloader}}} program from the {{{yum-utils}}} package is available for doing thi
    271 s very thing. Simply run something like: {{{
     239'''A.''' Well, you're on this page so that's a start.  And you've already passed
     240 most of the technical faqs and the advice on using Google to search the mailing
     241 list. If you've made it this far and haven't solved your problem you should kno
     242w about the [http://yum.baseurl.org/#GetHelp support options.]  Basically, ask q
     243uestions on the [http://lists.baseurl.org/mailman/listinfo/yum mailing list] and
     244 file bugs in [http://yum.baseurl.org/report trac]
     245
     246----
     247
     248===== Q. 13: If the most recent version of a package is available in multiple re
     249positories, how can I instruct yum to consistently pull it from a specific repos
     250itory?  Stated differently, how can I give priority to a certain mirror or my lo
     251cal repositories? =====
     252
     253'''A.''' yum will get the package from the repository listed first in the yum.co
     254nf file.  You can read more in [http://lists.baseurl.org/pipermail/yum/2005-May/
     255017649.html this explanation.]
     256
     257----
     258
     259===== Q. 14: How can I tell yum to download a source package (i.e., a .src.rpm f
     260ile)? =====
     261
     262'''A.''' The main yum program doesn't do this -- it's not within the scope of th
     263e program's design goals. But, since it's a very useful function, the {{{yumdown
     264loader}}} program from the {{{yum-utils}}} package is available for doing this v
     265ery thing. Simply run something like: {{{
    272266  yumdownloader --source yum
    273267}}}
     
    275269
    276270In order to keep yum's interface (and internal code) clean and straightforward,
    277  this will not be added to yum proper. And yumdownloader works well.
    278 ----
    279 
    280 
    281 ===== Q. 15: I'm behind a Microsoft proxy using NTLM authentication.  What can
    282 I do? =====
    283 '''A.''' Some people have had luck using [http://ntlmaps.sourceforge.net/ the N
    284 TLM APS project].
     271this will not be added to yum proper. And yumdownloader works well.
     272----
     273
     274
     275===== Q. 15: I'm behind a Microsoft proxy using NTLM authentication.  What can I
     276 do? =====
     277'''A.''' Some people have had luck using [http://ntlmaps.sourceforge.net/ the NT
     278LM APS project].
    285279----
    286280
    287281===== Q. 16: Can yum downgrade packages? =====
    288 '''A.''' Not really. Look at DownGradeProblems for more details on why downgrad
    289 es are tricky.
     282'''A.''' Downgrades are tricky but in yum versions 3.2.27 and above it can do _s
     283ome_ downgrades. They are not perfect and should be
     284         used with care.
    290285----
    291286
    292287==== Q. 17: Why does yum always seem to update the metadata on EVERY run? ====
    293 '''A.''' It doesn't. It updates to check the metadata any time the cache timeou
    294 t has been hit. The default can be set in your /etc/yum.conf
    295 file and per repository config. see the yum man page and look for the metadata_
    296 expire value for how to set it to a different value.
    297 ----
    298 
     288'''A.''' It doesn't. It updates to check the metadata any time the cache timeout
     289 has been hit. The default can be set in your /etc/yum.conf
     290file and per repository config. see the yum man page and look for the metadata_e
     291xpire value for how to set it to a different value.
     292----
     293
     294==== Q. 18: How does yum determine which pkg to install for a dependency if more
     295 than one pkg provides a dependency? ====
     296'''A.''' See the CompareProviders wiki page for more detailed information.
     297----
     298
     299=== Q. 19: What's the yum equivalent for rpm --nodeps --force? ===
     300'''A.''' See the NoDeps wiki page for more detailed information.
     301----
     302
     303
Note: See TracChangeset for help on using the changeset viewer.