source: yum/trunk/FAQ@ 1569

Last change on this file since 1569 was 516, checked in by Yuri Dario, 11 years ago

yum: update trunk to 3.4.3.

  • Property svn:eol-style set to native
File size: 11.1 KB
Line 
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
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.
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
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? =====
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
31s.
32
33 * Another way to pin package "foo" to a certain version is to use the versionlo
34ck plugin.
35
36If you are using the latest Fedora (12) then the plugin can be installed using:
37{{{
38yum install yum-plugin-versionlock
39}}}
40
41
42To add files that you want version locked, use the following yum command:
43
44{{{
45yum versionlock <package-name>
46}}}
47
48you can also use wildcards:
49
50{{{
51yum versionlock <package-name>-*
52}}}
53
54This command line will add lines to:
55{{{
56/etc/yum/pluginconf.d/versionlock.list
57}}}
58
59The config file uses the following format:
60EPOCH:NAME-VERSION-RELEASE.ARCH which can be obtained using:
61
62{{{
63rpm -q <package name> --queryformat "%{EPOCH}:%{NAME}-%{VERSION}-%{RELEASE}\n "
64}}}
65
66
67If no EPOCH is specified in the package, then the number will be 0.
68
69Alternatively if you are using Redhat 5.4/Centos 5.4 or another OS
70that does not yet have the latest yum available you can use:
71{{{
72yum install yum-versionlock
73}}}
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.
76
77For a manual install the source can be obtained from the current git
78repository for yum which is
79[http://yum.baseurl.org/gitweb]
80The files you need will be found in the ''yum-utils/plugins/versionlock''
81part of the git tree.
82Copy versionlock.py to ''/usr/lib/yum-plugins/versionlock.py''
83Copy versionlock.conf to ''/etc/yum/pluginconf.d/versionlock.conf''
84Create ''/etc/yum/pluginconf.d/versionlock.list''
85All 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
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.
95
96You can try doing a "trace" with this command:
97{{{
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.
108
109The 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
114proxy
115 3. Create a local mirror with rsync and then point your yum.conf to that local
116mirror
117 4. Don't use yum
118
119----
120
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=====
152
153'''A.'''
154
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
171
172rpmbuild --rebuild yum*.src.rpm
173
174----
175
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.
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
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.
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
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.
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
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.
222
223for 2.0.X or earlier:[[BR]]
224yum-arch /path/to/where/you/want/the/repo/made
225
226for 2.2.x or later:[[BR]]
227createrepo /path/to/where/you/want/the/repo/made
228
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
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
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: {{{
266 yumdownloader --source yum
267}}}
268and you'll get the yum src.rpm in your current directory.
269
270In order to keep yum's interface (and internal code) clean and straightforward,
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].
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
283ome_ 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
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 TracBrowser for help on using the repository browser.