1

We have a problem with yum on our server (Red Hat 5.7, Apache 2.2.3). If i try for example

yum update

the following error occurs:

    Loaded plugins: downloadonly, replace, rhnplugin, security
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 157, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 187, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 665, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 254, in _getConfig
    self.plugins.run('init')
  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/rhnplugin.py", line 121, in init_hook
    login_info = up2dateAuth.getLoginInfo()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 219, in getLoginInfo
    login()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 186, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 50, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 204, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 68, in _request1
    raise InvalidRedirectionError(
NameError: global name 'InvalidRedirectionError' is not defined

Another problem is that we do not even exactly know what caused this problem. Most probably somebody updated python and changed default version some time ago (this person is not here anymore).

We found some options to repaire yum on the web, but none of them worked. Does anybody have a clue how to fix this?

f_puras
  • 2,521
  • 4
  • 33
  • 38
Arthur Blixem
  • 11
  • 1
  • 2

2 Answers2

0
  1. Check if you are behind a firewall, blocking connection to mirror.
  2. Update libxml2.
  3. Try disabling repos in /etc/yum.repos.d — some of them may cause the problem.
  4. Try doing vi /etc/yum/pluginconf.d/fastestmirror.conf

And change this line

enable=1

to

enable=0

If none of those help. Try executing

export LD_LIBRARY_PATH=/usr/lib64:/usr/local/lib

then run

yum clean all

and test your yum. If it’s okay — add this export statement to your .bash_profile

Ilanus
  • 6,690
  • 5
  • 13
  • 37
  • Thanks for your tips. We have actually tried all of them except number 2. It looks like we have to recompile PHP to update libxml2, but we try to avoid recompiling, because it is a production server. – Arthur Blixem Aug 17 '15 at 12:01
0

The problem was not the python installation like we thought, but that the server could not access RHN. So the problem is resolved now after migrating to a new server. Thanks for everybody's help!

Arthur Blixem
  • 11
  • 1
  • 2