yum-error

Yum Error yummain.user_main(sys.argv[1:], exit_code=True)

Jadi teringat masa lalu sewaktu mengalami error yang sama di CentOS 5.3 yakni tidak bisa melakukan installasi software via yum, ah…, memang menyusahkan jika mie instan eh install secara instan ini tidak berfungsi, tidak terbayang lagi betapa pusingnya jika harus compile semua paket aplikasi :D. Error messages yang muncul ketika melakukan instalasi software via yum adalah:

[[email protected] ~]$ sudo yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/yummain.py”, line 309, in user_main
errcode = main(args)
File “/usr/share/yum-cli/yummain.py”, line 178, in main
result, resultmsgs = base.doCommands()
File “/usr/share/yum-cli/cli.py”, line 345, in doCommands
self._getTs(needTsRemove)
File “/usr/lib/python2.4/site-packages/yum/depsolve.py”, line 101, in _getTs
self._getTsInfo(remove_only)
File “/usr/lib/python2.4/site-packages/yum/depsolve.py”, line 112, in _getTsInfo
pkgSack = self.pkgSack
File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 661, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 501, in _getSacks
self.repos.populateSack(which=repos)
File “/usr/lib/python2.4/site-packages/yum/repos.py”, line 232, in populateSack
self.doSetup()
File “/usr/lib/python2.4/site-packages/yum/repos.py”, line 79, in doSetup
self.ayum.plugins.run(‘postreposetup’)
File “/usr/lib/python2.4/site-packages/yum/plugins.py”, line 179, in run
func(conduitcls(self, self.base, conf, **kwargs))
File “/usr/lib/yum-plugins/fastestmirror.py”, line 181, in postreposetup_hook
all_urls = FastestMirror(all_urls).get_mirrorlist()
File “/usr/lib/yum-plugins/fastestmirror.py”, line 333, in get_mirrorlist
self._poll_mirrors()
File “/usr/lib/yum-plugins/fastestmirror.py”, line 376, in _poll_mirrors
pollThread.start()
File “/usr/lib/python2.4/threading.py”, line 416, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can’t start new thread

Error di CentOS ini terkait dengan issue fastest mirror yang corrupt dan ada beberapa orang menyarankan untuk meremove yum-fastestmirror namun beberapa orang lainnya menyarankan untuk menghindari hal ini karena cukup berbahaya menguninstall paket yum. Dan solusi terbaik yang dapat mengatasi masalah ini adalah dengan mendisable fungsi fastest mirror di konfigurasi repository CentOS seperti dibawah ini:

[[email protected] ~]$ sudo vi /etc/yum/pluginconf.d/fastestmirror.conf

Selanjutnya cari baris enabled=1 ganti menjadi enabled=0, sehingga menjadi:

[main]
enabled=0
verbose=0
socket_timeout=3
hostfilepath=/var/cache/yum/timedhosts.txt
maxhostfileage=10
maxthreads=15

It’s worked for me :D

One thought on “Yum Error yummain.user_main(sys.argv[1:], exit_code=True)

Leave a Reply

Your email address will not be published. Required fields are marked *


*