PDA

View Full Version : Help! Yum



Remel
1st May 2010, 01:45 PM
Whenever I try to install something this comes up:

Repository 'vz-base' is missing name in configuration, using id
Repository 'vz-updates' is missing name in configuration, using id
updates/metalink | 16 kB 00:00
updates | 4.4 kB 00:00
updates/primary_db | 4.1 MB 00:02
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 254, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 109, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 352, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsIn fo
pkgSack = self.pkgSack
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 774, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 564, in _getSack s
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 279, in populateSac k
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 164, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db _version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1227, in _check_d b_version
repoXML = self.repoXML
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1417, in <lambda>
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1409, in _getRepo XML
self._loadRepoXML(text=self)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1399, in _loadRep oXML
return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1375, in _groupLo adRepoXML
self._commonRetrieveDataMD(mdtypes)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1359, in _commonR etrieveDataMD
misc.bunzipFile(dl_local, local)
File "/usr/lib/python2.6/site-packages/yum/misc.py", line 687, in bunzipFile
data = s_fn.read(1024000)
MemoryError


Any help?

BugRocks1
1st May 2010, 03:01 PM
Fedora 12 Yum troubleshooting

• Packagekit shipped broken in Fedora 12 so if it is a new install never updated try:

su -
yum clean all
yum update

• Sometimes yum corrupts its temporary files to fix that try:

su -
yum clean all

• Yum has a bug that make it wait forever for a response from a website. Right now rpmfusion is being affected and to solve that, one needs to comment all mirrorlist lines in all rpmfusion repo files that are located in /etc/yum.repos.d

• First try urlgrabber to confirm it is a problem with some repo.

∘ In /etc/yum.repos.d you will find a file named "rpmfusion-free.repo"

[rpmfusion-free]
name=RPM Fusion for Fedora $releasever - Free
baseurl=http://download1.rpmfusion.org/free/fedora/releases/$releasever/Everything/$basearch/os/
#mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever-$basearch

∘ Get the mirrorlist url and change $releasever and $basearch(releasesever=12,13 etc and basearch=i386) then issue.


$ cd ~/Desktop
urlgrabber http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-12&arch=i386

∘ After that look at the desktop to see if it have a metalink file with a list of servers inside. If you get no metalink file but instead see a file named "mirrorlist" with just one line you need to comment out all the mirrorlist in all rpmfusion repo files and uncomment the base url ones like in the quote above.

∘ Original repo file state:

#baseurl=http://download1.rpmfusion.org/free/fedora/releases/$releasever/Everything/$basearch/os/
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-$releasever&arch=$basearch

∘ Mirrorlist commented:

baseurl=http://download1.rpmfusion.org/free/fedora/releases/$releasever/Everything/$basearch/os/
#mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-$releasever&arch=$basearch

‣ 1 - after you update those things there will be updates for the rpmfusion repos, if it breaks again after the repo files are updated redo the operation, but try the update first because they may fix that problem on their end someday instead of waiting for a fix in YUM.

• If that doesn't work try:


su -
rm -f /var/lib/rpm/__db*
rpm -–rebuilddb
yum clean all

∘ 1 - This will rebuild the rpm database. This is a desperate attempt to find a problem somewhere and if the build doesn't go right you could end up with a broken rpm database that you will need to rebuild again.

• To see what package provides some file:


yum provides /etc/yum.repos.d/fedora.repo

• Enabling debugging in YUM:


yum --verbose -d 10 list updates

• Disabling and enabling repos:


yum --disablerepo=* --enablerepo=updates* updates list

• Downgrading a package:


yum downgrade [package here]

Remel
1st May 2010, 03:14 PM
This is what happened:

[root@server ~]# su -
[root@server ~]# su -
[root@server ~]# rm -f /var/lib/rpm/__db*
[root@server ~]# rpm --rebuilddb
[root@server ~]# yum clean all
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 254, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 88, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 191, in getOptionsConfig
self.conf
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 778, in <lambda>
conf = property(fget=lambda self: self._getConfig(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 302, in _getConfig
self.getReposFromConfig()
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 409, in getReposFromConfig
self.getReposFromConfigFile(repofn, repo_age=thisrepo_age)
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 369, in getReposFromConfigFile
thisrepo = self.readRepoConfig(parser, section)
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 425, in readRepoConfig
'using id') % section)
File "/usr/lib/python2.6/logging/__init__.py", line 1056, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/lib/python2.6/logging/__init__.py", line 1142, in _log
record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)
File "/usr/lib/python2.6/logging/__init__.py", line 1117, in makeRecord
rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
File "/usr/lib/python2.6/logging/__init__.py", line 272, in __init__
from multiprocessing import current_process
File "/usr/lib/python2.6/multiprocessing/__init__.py", line 63, in <module>
from multiprocessing.process import Process, current_process, active_children
File "/usr/lib/python2.6/multiprocessing/process.py", line 18, in <module>
import itertools
ImportError: /usr/lib/python2.6/lib-dynload/itertoolsmodule.so: failed to map segment from shared object: Cannot allocate memory
[root@server ~]# yum provides /etc/yum.repos.d/fedora.repo
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 254, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 88, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 191, in getOptionsConfig
self.conf
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 778, in <lambda>
conf = property(fget=lambda self: self._getConfig(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 302, in _getConfig
self.getReposFromConfig()
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 409, in getReposFromConfig
self.getReposFromConfigFile(repofn, repo_age=thisrepo_age)
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 369, in getReposFromConfigFile
thisrepo = self.readRepoConfig(parser, section)
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 425, in readRepoConfig
'using id') % section)
File "/usr/lib/python2.6/logging/__init__.py", line 1056, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/lib/python2.6/logging/__init__.py", line 1142, in _log
record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)
File "/usr/lib/python2.6/logging/__init__.py", line 1117, in makeRecord
rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
File "/usr/lib/python2.6/logging/__init__.py", line 272, in __init__
from multiprocessing import current_process
File "/usr/lib/python2.6/multiprocessing/__init__.py", line 63, in <module>
from multiprocessing.process import Process, current_process, active_children
File "/usr/lib/python2.6/multiprocessing/process.py", line 18, in <module>
import itertools
ImportError: /usr/lib/python2.6/lib-dynload/itertoolsmodule.so: failed to map segment from shared object: Cannot allocate memory
[root@server ~]# yum --disablerepo=* --enablerepo=updates* updates list
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 254, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 88, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 191, in getOptionsConfig
self.conf
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 778, in <lambda>
conf = property(fget=lambda self: self._getConfig(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 302, in _getConfig
self.getReposFromConfig()
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 409, in getReposFromConfig
self.getReposFromConfigFile(repofn, repo_age=thisrepo_age)
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 369, in getReposFromConfigFile
thisrepo = self.readRepoConfig(parser, section)
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 425, in readRepoConfig
'using id') % section)
File "/usr/lib/python2.6/logging/__init__.py", line 1056, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/lib/python2.6/logging/__init__.py", line 1142, in _log
record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)
File "/usr/lib/python2.6/logging/__init__.py", line 1117, in makeRecord
rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
File "/usr/lib/python2.6/logging/__init__.py", line 272, in __init__
from multiprocessing import current_process
File "/usr/lib/python2.6/multiprocessing/__init__.py", line 63, in <module>
from multiprocessing.process import Process, current_process, active_children
File "/usr/lib/python2.6/multiprocessing/process.py", line 18, in <module>
import itertools
ImportError: /usr/lib/python2.6/lib-dynload/itertoolsmodule.so: failed to map segment from shared object: Cannot allocate memory
You have mail in /var/spool/mail/root

BugRocks1
1st May 2010, 04:16 PM
Reinstall python:

Go to koji and download from the browser the most recent python and install it.

Get the dependencies:


rpm -q --requires python-2.6.2-4.fc12.i686



- Make a txt somewhere and get the packages it depends on.


$ rpm -q --whatprovides $(cat /home/MeMeMe/Desktop/pythondependencies.log)
bash-4.0.35-3.fc12.i686
coreutils-7.6-9.fc12.i686
python-2.6.2-4.fc12.i686
bzip2-libs-1.0.5-6.fc12.i686
glibc-2.11.1-4.i686
glibc-2.11.1-4.i686
openssl-1.0.0-0.13.beta4.fc12.i686
db4-4.7.25-13.fc12.i686
glibc-2.11.1-4.i686
libffi-3.0.5-3.fc12.i686
gdbm-1.8.0-33.fc12.i686
glibc-2.11.1-4.i686
glibc-2.11.1-4.i686
ncurses-libs-5.7-3.20090207.fc12.i686
glibc-2.11.1-4.i686
ncurses-libs-5.7-3.20090207.fc12.i686
glibc-2.11.1-4.i686
python-libs-2.6.2-4.fc12.i686
readline-6.0-3.fc12.i686
sqlite-3.6.20-1.fc12.i686
openssl-1.0.0-0.13.beta4.fc12.i686
ncurses-libs-5.7-3.20090207.fc12.i686
glibc-2.11.1-4.i686
zlib-1.2.3-23.fc12.i686

- Get all the urls for those packages and issue:

Example:

su -

rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm http://rpm.livna.org/livna-release.rpm

Where to find those packages?

http://koji.fedoraproject.org/koji/index

---------- Post added at 07:16 AM CDT ---------- Previous post was at 07:06 AM CDT ----------

Try also reinstalling yum.

If it fails I wish you the best of luck, and that someone more capable them me can solve this.