Yum failing with Syntax Error - Can't run updates

2 posts / 0 new
Last post
#1 Fri, 03/05/2010 - 18:38
pawprint_net
pawprint_net's picture

Yum failing with Syntax Error - Can't run updates

I have a CentOS 5.4 box running usermin/virtualmin and have been keeping it up to date for the last year. There are no custom repos. Recently all the updates have started failing because yum is broken somehow. Even if I just try to get a version or something here is the response I get from the command line:

# yum -v
Traceback (most recent call last):
File "/usr/bin/yum", line 4, in ?
import yum
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 5
require './apache-lib.pl';
^
SyntaxError: invalid syntax
#

Anyone have any ideas how to fix this?

I have seen a lot online about problems with yum suggesting "yum clean all" as a fix - but I can't get yum to even start so, of course, that is not an option. I have done nothing manually to this box - the last update must have caused this issue. I also dunno much about perl but I see no problem with the line:

require './apache-lib.pl';

Which is on it's own in the file mentioned.

Sat, 03/06/2010 - 08:27
andreychek

Hrm. Line 5 of that init.py file shouldn't contain the line "require './apache-lib.pl';" -- I have no idea why that would be in there, as that require line is only for Perl code, and the init file you're looking at is in Python :-)

If that's the only thing unusual there, you may want to comment it out... but if that's in there, I don't know what other oddities to expect :-)

-Eric

Topic locked