File: FAQ

package info (click to toggle)
yum 3.4.3-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 5,568 kB
  • ctags: 3,840
  • sloc: python: 31,746; sh: 892; makefile: 254
file content (303 lines) | stat: -rw-r--r-- 11,387 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
= Faq =

===== Q. 1: What is this? =====

'''A.''' A yum faq.
----

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

'''A.''' We have no idea.  Your distribution should maintain their own list on t
his subject.  If they don't support yum but you want to use it anyway you are pr
obably 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 [http://fedora
project.org/wiki/YumUpgradeFaq this guide written by Fedora Developers and Contr
ibutors].  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 fa
shion 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 detail
s.

 * Another way to pin package "foo" to a certain version is to use the versionlo
ck 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:
{{{
/etc/yum/pluginconf.d/versionlock.list
}}}

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 ca
n 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 ma
y 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.e
xample.com 80
}}}
Which should give you some more information about the network between you and th
e repository.  Also, be sure to replace yum-server.example.com with whatever you
r yum repository server is.

Another diagnosis step is to get the box off of that network (not always entirel
y 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 in
terpret 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 pa
ckages that are about to be upgraded/obsoleted and then reinstall that package a
fter 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 packag
e 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 [http://lists.baseurl.org/pipermail/yum/2005-July/018079.h
tml this post by Garrick Staples]

----

===== Q. 7: I installed a new version of yum (or upgraded my whole system) and n
ow when I run yum, I get an error saying "The yum libraries do not seem to be av
ailable on your system for this version of python" and "Please make sure the pac
kage 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?
=====

'''A.'''

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, py
thon-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 inst
all that.

If you are getting a message that yum itself is the missing module then you prob
ably installed it incorreclty (or installed the source rpm using make/make insta
ll).  If possible, find a prebuilt rpm that will work for your system like one f
rom 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 | open
afs | other module) and yum doesn't seem to handle it well.  Could you fix yum t
o handle this for me? =====

'''A.''' This is a known and non-trivial problem, but people are talking and wor
king on it.  Please read ideas on [http://lists.baseurl.org/pipermail/yum-devel/
2005-June/thread.html#1232 this plugin] and messages from [http://www.google.com
/search?q=yum+kernel+module+site:lists.baseurl.org&num=20&hl=en&lr=&start=20&sa=
N 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 versio
ns of a package installed on a machine such as when another package only has a 3
2bit version and needs to access 32bit libraries of something that you would nor
mally 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 f
or the mailing list [http://www.google.com/search?num=20&hl=en&lr=&q=your_search
_term+site%3Alists.baseurl.org&btnG=Search thusly.]  Of course, you should repla
ce "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 re
pository, just make sure that your rsync script (or whatever mirroring process y
ou 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 v
ersion of yum that you are going to use with this repository, but the method is
basically the same.

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

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

You may also be served by reading [http://createrepo.baseurl.org/] and even sear
ching 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 kno
w about the [http://yum.baseurl.org/#GetHelp support options.]  Basically, ask q
uestions on the [http://lists.baseurl.org/mailman/listinfo/yum mailing list] and
 file bugs in [http://yum.baseurl.org/report trac]

----

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

'''A.''' yum will get the package from the repository listed first in the yum.co
nf file.  You can read more in [http://lists.baseurl.org/pipermail/yum/2005-May/
017649.html this explanation.]

----

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

'''A.''' The main yum program doesn't do this -- it's not within the scope of th
e program's design goals. But, since it's a very useful function, the {{{yumdown
loader}}} program from the {{{yum-utils}}} package is available for doing this v
ery 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 [http://ntlmaps.sourceforge.net/ the NT
LM APS project].
----

===== Q. 16: Can yum downgrade packages? =====
'''A.''' Downgrades are tricky but in yum versions 3.2.27 and above it can do _s
ome_ 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_e
xpire 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.
----