| 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 di
|
|---|
| 9 | stribution <XYZ>? =====
|
|---|
| 10 |
|
|---|
| 11 | '''A.''' We have no idea. Your distribution should maintain their own list on t
|
|---|
| 12 | his subject. If they don't support yum but you want to use it anyway you are pr
|
|---|
| 13 | obably going to have to make your own repository.
|
|---|
| 14 | ----
|
|---|
| 15 |
|
|---|
| 16 | ===== Q. 3: How do I upgrade my machine from release X to release Y? =====
|
|---|
| 17 |
|
|---|
| 18 | '''A.''' We have little idea. If you are using Fedora, check out [http://fedora
|
|---|
| 19 | project.org/wiki/YumUpgradeFaq this guide written by Fedora Developers and Contr
|
|---|
| 20 | ibutors]. If you are using something else, try looking at their docs or asking
|
|---|
| 21 | 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 fa
|
|---|
| 26 | shion similar to pinning provided by apt? =====
|
|---|
| 27 |
|
|---|
| 28 | '''A.''' There are several ways you can do this.
|
|---|
| 29 |
|
|---|
| 30 | * One is to exclude it from your updates list. See man yum.conf for more detail
|
|---|
| 31 | s.
|
|---|
| 32 |
|
|---|
| 33 | * Another way to pin package "foo" to a certain version is to use the versionlo
|
|---|
| 34 | ck plugin.
|
|---|
| 35 |
|
|---|
| 36 | If you are using the latest Fedora (12) then the plugin can be installed using:
|
|---|
| 37 | {{{
|
|---|
| 38 | yum install yum-plugin-versionlock
|
|---|
| 39 | }}}
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 | To add files that you want version locked, use the following yum command:
|
|---|
| 43 |
|
|---|
| 44 | {{{
|
|---|
| 45 | yum versionlock <package-name>
|
|---|
| 46 | }}}
|
|---|
| 47 |
|
|---|
| 48 | you can also use wildcards:
|
|---|
| 49 |
|
|---|
| 50 | {{{
|
|---|
| 51 | yum versionlock <package-name>-*
|
|---|
| 52 | }}}
|
|---|
| 53 |
|
|---|
| 54 | This command line will add lines to:
|
|---|
| 55 | {{{
|
|---|
| 56 | /etc/yum/pluginconf.d/versionlock.list
|
|---|
| 57 | }}}
|
|---|
| 58 |
|
|---|
| 59 | The config file uses the following format:
|
|---|
| 60 | EPOCH:NAME-VERSION-RELEASE.ARCH which can be obtained using:
|
|---|
| 61 |
|
|---|
| 62 | {{{
|
|---|
| 63 | rpm -q <package name> --queryformat "%{EPOCH}:%{NAME}-%{VERSION}-%{RELEASE}\n "
|
|---|
| 64 | }}}
|
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 | If no EPOCH is specified in the package, then the number will be 0.
|
|---|
| 68 |
|
|---|
| 69 | Alternatively if you are using Redhat 5.4/Centos 5.4 or another OS
|
|---|
| 70 | that does not yet have the latest yum available you can use:
|
|---|
| 71 | {{{
|
|---|
| 72 | yum install yum-versionlock
|
|---|
| 73 | }}}
|
|---|
| 74 | This older version of the plug-in does not extend command line flags that you ca
|
|---|
| 75 | n pass to yum and the lock list must be edited manually.
|
|---|
| 76 |
|
|---|
| 77 | For a manual install the source can be obtained from the current git
|
|---|
| 78 | repository for yum which is
|
|---|
| 79 | [http://yum.baseurl.org/gitweb]
|
|---|
| 80 | The files you need will be found in the ''yum-utils/plugins/versionlock''
|
|---|
| 81 | part of the git tree.
|
|---|
| 82 | Copy versionlock.py to ''/usr/lib/yum-plugins/versionlock.py''
|
|---|
| 83 | Copy versionlock.conf to ''/etc/yum/pluginconf.d/versionlock.conf''
|
|---|
| 84 | Create ''/etc/yum/pluginconf.d/versionlock.list''
|
|---|
| 85 | All files should be ''root.root'' with ''644'' permissions.
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 | ----
|
|---|
| 89 |
|
|---|
| 90 | ===== Q. 5: I get an "[Errno -1] Header is not complete." error from yum - what
|
|---|
| 91 | the heck is going on? =====
|
|---|
| 92 |
|
|---|
| 93 | '''A.''' It's probably a proxy somewhere between you and the repository. You ma
|
|---|
| 94 | y not think that a proxy is in the way even though it really is.
|
|---|
| 95 |
|
|---|
| 96 | You can try doing a "trace" with this command:
|
|---|
| 97 | {{{
|
|---|
| 98 | echo -e "TRACE / HTTP/1.1\nHost: yum-server.example.com\n\n" | nc yum-server.e
|
|---|
| 99 | xample.com 80
|
|---|
| 100 | }}}
|
|---|
| 101 | Which should give you some more information about the network between you and th
|
|---|
| 102 | e repository. Also, be sure to replace yum-server.example.com with whatever you
|
|---|
| 103 | r yum repository server is.
|
|---|
| 104 |
|
|---|
| 105 | Another diagnosis step is to get the box off of that network (not always entirel
|
|---|
| 106 | y possible, but port forwarding, VPN, or dialup can simulate the experience) and
|
|---|
| 107 | see if you still have the problem.
|
|---|
| 108 |
|
|---|
| 109 | The solutions to this problem are:
|
|---|
| 110 |
|
|---|
| 111 | 1. Get your proxy software/firmware updated so that it properly implements HTTP
|
|---|
| 112 | 1.1
|
|---|
| 113 | 2. Use an FTP repository, where byte ranges are more commonly supported by the
|
|---|
| 114 | proxy
|
|---|
| 115 | 3. Create a local mirror with rsync and then point your yum.conf to that local
|
|---|
| 116 | mirror
|
|---|
| 117 | 4. Don't use yum
|
|---|
| 118 |
|
|---|
| 119 | ----
|
|---|
| 120 |
|
|---|
| 121 | ===== Q. 6: I'm upgrading and I get "Error: Missing Dependency:" messages like "
|
|---|
| 122 | Error: Missing Dependency: libgcj.so.5 is needed by package junit" and then yum
|
|---|
| 123 | quits. 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
|
|---|
| 127 | terpret 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 |
|
|---|
| 131 | One relatively easy way to fix this is to remove whatever package "needs" the pa
|
|---|
| 132 | ckages that are about to be upgraded/obsoleted and then reinstall that package a
|
|---|
| 133 | fter you have upgraded everything else. In the example, remove junit, upgrade,
|
|---|
| 134 | then reinstall junit.
|
|---|
| 135 |
|
|---|
| 136 | Another solution is to find a repository that provides an upgraded of the packag
|
|---|
| 137 | e 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 |
|
|---|
| 141 | For more details, see [http://lists.baseurl.org/pipermail/yum/2005-July/018079.h
|
|---|
| 142 | tml 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
|
|---|
| 147 | ow when I run yum, I get an error saying "The yum libraries do not seem to be av
|
|---|
| 148 | ailable on your system for this version of python" and "Please make sure the pac
|
|---|
| 149 | kage 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 | =====
|
|---|
| 152 |
|
|---|
| 153 | '''A.'''
|
|---|
| 154 |
|
|---|
| 155 | In 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
|
|---|
| 158 | thon-sqlite, or python-elementtree package.
|
|---|
| 159 |
|
|---|
| 160 | Yum 2.4.x provides a different error with the module import errors, so this will
|
|---|
| 161 | become less confusing.
|
|---|
| 162 |
|
|---|
| 163 | It 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
|
|---|
| 165 | all that.
|
|---|
| 166 |
|
|---|
| 167 | If you are getting a message that yum itself is the missing module then you prob
|
|---|
| 168 | ably installed it incorreclty (or installed the source rpm using make/make insta
|
|---|
| 169 | ll). If possible, find a prebuilt rpm that will work for your system like one f
|
|---|
| 170 | rom Fedora or CentOS. Or, you can download the srpm and do a
|
|---|
| 171 |
|
|---|
| 172 | rpmbuild --rebuild yum*.src.rpm
|
|---|
| 173 |
|
|---|
| 174 | ----
|
|---|
| 175 |
|
|---|
| 176 | ===== Q. 8: Yum is very nice at updating my kernel, but I use the (nvidia | open
|
|---|
| 177 | afs | other module) and yum doesn't seem to handle it well. Could you fix yum t
|
|---|
| 178 | o handle this for me? =====
|
|---|
| 179 |
|
|---|
| 180 | '''A.''' This is a known and non-trivial problem, but people are talking and wor
|
|---|
| 181 | king on it. Please read ideas on [http://lists.baseurl.org/pipermail/yum-devel/
|
|---|
| 182 | 2005-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=
|
|---|
| 184 | N the Google search of the yum archives] to get more details.
|
|---|
| 185 |
|
|---|
| 186 | ----
|
|---|
| 187 |
|
|---|
| 188 |
|
|---|
| 189 | ===== Q. 9: How does yum handle updates/installs on x86_64 machines? =====
|
|---|
| 190 |
|
|---|
| 191 | '''A.''' There are times when it is beneficial to have both 32 and 64 bit versio
|
|---|
| 192 | ns of a package installed on a machine such as when another package only has a 3
|
|---|
| 193 | 2bit version and needs to access 32bit libraries of something that you would nor
|
|---|
| 194 | mally only install the 64bit package. So, if you do "yum install foo" then you
|
|---|
| 195 | will 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.
|
|---|
| 198 |
|
|---|
| 199 | ----
|
|---|
| 200 |
|
|---|
| 201 |
|
|---|
| 202 |
|
|---|
| 203 | ===== Q. 10: How can I search the mailing list archives? =====
|
|---|
| 204 |
|
|---|
| 205 | '''A.''' One easy way is to use the google site: keyword pointed at the server f
|
|---|
| 206 | or 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
|
|---|
| 208 | ce "your_search_term" in that example to your search term.
|
|---|
| 209 |
|
|---|
| 210 | ----
|
|---|
| 211 |
|
|---|
| 212 | ===== Q. 11: How can I create a yum repository? =====
|
|---|
| 213 |
|
|---|
| 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
|
|---|
| 216 | pository, just make sure that your rsync script (or whatever mirroring process y
|
|---|
| 217 | ou are using) includes the repodata directory from the mirror's source.
|
|---|
| 218 |
|
|---|
| 219 | If you really want to make your own yum repository, the command depends on the v
|
|---|
| 220 | ersion of yum that you are going to use with this repository, but the method is
|
|---|
| 221 | basically the same.
|
|---|
| 222 |
|
|---|
| 223 | for 2.0.X or earlier:[[BR]]
|
|---|
| 224 | yum-arch /path/to/where/you/want/the/repo/made
|
|---|
| 225 |
|
|---|
| 226 | for 2.2.x or later:[[BR]]
|
|---|
| 227 | createrepo /path/to/where/you/want/the/repo/made
|
|---|
| 228 |
|
|---|
| 229 | You may also be served by reading [http://createrepo.baseurl.org/] and even sear
|
|---|
| 230 | ching the yum list archives as described in question 10
|
|---|
| 231 |
|
|---|
| 232 |
|
|---|
| 233 | ----
|
|---|
| 234 |
|
|---|
| 235 |
|
|---|
| 236 |
|
|---|
| 237 | ===== Q. 12: How can I get help? =====
|
|---|
| 238 |
|
|---|
| 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
|
|---|
| 242 | w about the [http://yum.baseurl.org/#GetHelp support options.] Basically, ask q
|
|---|
| 243 | uestions 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
|
|---|
| 249 | positories, how can I instruct yum to consistently pull it from a specific repos
|
|---|
| 250 | itory? Stated differently, how can I give priority to a certain mirror or my lo
|
|---|
| 251 | cal repositories? =====
|
|---|
| 252 |
|
|---|
| 253 | '''A.''' yum will get the package from the repository listed first in the yum.co
|
|---|
| 254 | nf file. You can read more in [http://lists.baseurl.org/pipermail/yum/2005-May/
|
|---|
| 255 | 017649.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
|
|---|
| 260 | ile)? =====
|
|---|
| 261 |
|
|---|
| 262 | '''A.''' The main yum program doesn't do this -- it's not within the scope of th
|
|---|
| 263 | e program's design goals. But, since it's a very useful function, the {{{yumdown
|
|---|
| 264 | loader}}} program from the {{{yum-utils}}} package is available for doing this v
|
|---|
| 265 | ery thing. Simply run something like: {{{
|
|---|
| 266 | yumdownloader --source yum
|
|---|
| 267 | }}}
|
|---|
| 268 | and you'll get the yum src.rpm in your current directory.
|
|---|
| 269 |
|
|---|
| 270 | In order to keep yum's interface (and internal code) clean and straightforward,
|
|---|
| 271 | this 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
|
|---|
| 278 | LM APS project].
|
|---|
| 279 | ----
|
|---|
| 280 |
|
|---|
| 281 | ===== Q. 16: Can yum downgrade packages? =====
|
|---|
| 282 | '''A.''' Downgrades are tricky but in yum versions 3.2.27 and above it can do _s
|
|---|
| 283 | ome_ downgrades. They are not perfect and should be
|
|---|
| 284 | used with care.
|
|---|
| 285 | ----
|
|---|
| 286 |
|
|---|
| 287 | ==== Q. 17: Why does yum always seem to update the metadata on EVERY run? ====
|
|---|
| 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
|
|---|
| 290 | file and per repository config. see the yum man page and look for the metadata_e
|
|---|
| 291 | xpire 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 |
|
|---|