These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Yum failing with Syntax Error - Can't run updates on the new forum.
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.
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