Page 1 of 1

yum errors on CentOS 5

Posted: 2021/12/10 09:19:52
by fkc
I have a Virtualbox VM with CentOS 5 and I'm discovering problems using yum. I know that CentOS 5 is not supported by several years but I'm not prone to update the OS now.

In particular I am having troubles in command like:
yum update yum
yum update
yum install
And the error that comes out always report some paths and a final string that I don't understand:
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* epel: ftp-stud.hs-esslingen.de
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 662, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 502, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 260, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 168, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 226, in _check_db_version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1226, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1399, in <lambda>
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1391, in _getRepoXML
self._loadRepoXML(text=self)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1381, in _loadRepoXML
return self._groupLoadRepoXML(text, ["primary"])
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1365, in _groupLoadRepoXML
if self._commonLoadRepoXML(text):
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1201, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 974, in _getFileRepoXML
cache=self.http_caching == 'all')
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 811, in _getFile
http_headers=headers,
File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 412, in urlgrab
return self._mirror_try(func, url, kw)
File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 398, in _mirror_try
return func_ref( *(fullurl,), **kwargs )
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 936, in urlgrab
return self._retry(opts, retryfunc, url, filename)
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 854, in _retry
r = apply(func, (opts,) + args, {})
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 922, in retryfunc
fo = URLGrabberFileObject(url, filename, opts)
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1010, in __init__
self._do_open()
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1093, in _do_open
fo, hdr = self._make_request(req, opener)
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1202, in _make_request
fo = opener.open(req)
File "/usr/lib64/python2.4/urllib2.py", line 364, in open
response = meth(req, response)
File "/usr/lib64/python2.4/urllib2.py", line 471, in http_response
response = self.parent.error(
File "/usr/lib64/python2.4/urllib2.py", line 396, in error
result = self._call_chain(*args)
File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib64/python2.4/urllib2.py", line 565, in http_error_302
return self.parent.open(new)
File "/usr/lib64/python2.4/urllib2.py", line 358, in open
response = self._open(req, data)
File "/usr/lib64/python2.4/urllib2.py", line 376, in _open
'_open', req)
File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib64/python2.4/site-packages/M2Crypto/m2urllib2.py", line 82, in https_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/lib64/python2.4/httplib.py", line 810, in request
self._send_request(method, url, body, headers)
File "/usr/lib64/python2.4/httplib.py", line 833, in _send_request
self.endheaders()
File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
self._send_output()
File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
self.send(msg)
File "/usr/lib64/python2.4/httplib.py", line 652, in send
self.connect()
File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 55, in connect
sock.connect((self.host, self.port))
File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 174, in connect
ret = self.connect_ssl()
File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Connection.py", line 167, in connect_ssl
return m2.ssl_connect(self.ssl, self._timeout)
M2Crypto.SSL.SSLError: tlsv1 alert protocol version
Hope someone can help me.

Thanks in advance.

Re: yum errors on CentOS 5

Posted: 2021/12/10 17:16:18
by TrevorH
Point your yum .repo files at a copy of vault.centos.org that doesn't care about security and still allows connections from ancient systems without modern security. The vault.centos.org server only accepts connections with a minumum of TLS 1.2 and CentOS 5 does not speak that at all and never will.

You need to get off CentOS 5. It's now 4 years since it stopped being supported and 14 since it was released. Find an alternative sooner rather than later.

Re: yum errors on CentOS 5

Posted: 2022/06/01 13:19:25
by kOoLiNuS
Thanks for the tip!
This has worked for my installation…

Code: Select all

[base]
name=CentOS-$releasever - Base
baseurl=https://mirror.nsc.liu.se/centos-store/5.11/os/i386/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirror.nsc.liu.se/centos-store/5.11/updates/i386/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirror.nsc.liu.se/centos-store/5.11/extras/i386/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
I thought it might be useful for others to share it.
Cheers

Re: yum errors on CentOS 5

Posted: 2022/06/01 13:50:43
by TrevorH
It goes without saying that running a distro that hasn't had any updates for 5 years or so is an extremely bad idea.

Re: yum errors on CentOS 5

Posted: 2022/06/01 16:49:59
by jlehtone
fkc wrote:
2021/12/10 09:19:52
In particular I am having troubles in command like:

Code: Select all

yum update yum
yum update
yum install
The 'yum update' should be totally useless command since no updated packages have been added to repos since CentOS 5 did reach EOL years ago ... unless your previous update was even longer in the past and you've been using even more insecure system for years.

If I had EOL OS, it would not be connected to network.

Re: yum errors on CentOS 5

Posted: 2022/06/13 21:17:12
by canuck15
TrevorH wrote:
2022/06/01 13:50:43
It goes without saying that running a distro that hasn't had any updates for 5 years or so is an extremely bad idea.
No thread like this is complete without the obligatory lecture about something that is obvious and completely besides the point.

Re: yum errors on CentOS 5

Posted: 2022/06/13 22:08:22
by TrevorH
And yet, people still run it and have to be told. It's dead Jim..