Help!! Honey I broke the python! (CentOS 4.2, python 2.3.4)

If it doesn't fit in another category, ask it here.
lshekter
Posts: 9
Joined: 2006/03/20 03:06:19
Location: Toronto, Canada

Re: Help!! Honey I broke the python! (CentOS 4.2, python 2.3.4)

Post by lshekter » 2006/03/24 03:18:14

I updated the three packages as requested, but still no go :-(

# rpm -Uvh rhn-applet-2.1.24-3.centos4.i386.rpm
Preparing... ########################################### [100%]
1:rhn-applet ########################################### [100%]
# rpm -Uvh up2date-*
Preparing... ########################################### [100%]
1:up2date ########################################### [ 50%]
2:up2date-gnome ########################################### [100%]
Cross my fingers...
# up2date
Traceback (most recent call last):
File "/usr/sbin/up2date", line 23, in ?
from up2date_client import up2dateErrors
File "/usr/share/rhn/up2date_client/up2dateErrors.py", line 11, in ?
import up2dateLog
File "/usr/share/rhn/up2date_client/up2dateLog.py", line 7, in ?
import config
File "/usr/share/rhn/up2date_client/config.py", line 20, in ?
from rhpl.translate import _, N_
ImportError: No module named rhpl.translate

Lenard
Posts: 2283
Joined: 2005/11/29 02:35:25
Location: Indiana

Re: Help!! Honey I broke the python! (CentOS 4.2, python 2.3.4)

Post by Lenard » 2006/03/24 16:18:18

WTF!!!! I decided to test this out........ got pretty much the same errors as you.

It seems that up2date and the required packages are broken (at least on my system). After some testing on my system I finally got it working (took some time and looking around other places).

What works on my system (x86_64);

From Fedora Core 5; rhnlib-2.0-1.p24.3.1.noarch.rpm
From Fedora Core 4; pyOpenSSL-0.6-1.p24.4.1.x86_64.rpm rhpl-0.167-1.x86_64.rpm
From CentOS-4.3; up2date-4.4.67-4.centos4.x86_64.rpm up2date-gnome-4.4.67-4.centos4.x86_64.rpm

Now my system is highly customized (KDE-3.5.1 and python-2.4.1 and such) so the listed rpm packages above may work for you (for your arch of course) or may not. Good Luck!!!

Hopefully yum should work on your system (have you tried?), yum was (before testing) and still is working on my system.

lshekter
Posts: 9
Joined: 2006/03/20 03:06:19
Location: Toronto, Canada

Re: Help!! Honey I broke the python! (CentOS 4.2, python 2.3.4)

Post by lshekter » 2006/03/26 23:12:51

# rpm -qa pyOpenSSL
pyOpenSSL-0.6-1.p23
# rpm -qa rhpl
rhpl-0.148.3-1
#rpm -qa 'up2date*'
up2date-4.4.67-4.centos4
up2date-gnome-4.4.67-4.centos4

It seems like I have all the packages you mentioned, though not all at quite the same version level. yum *is* broken, to wit:
#yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named cElementTree

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.3.4 (#1, Mar 10 2006, 06:12:09)
[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)]
Please install a package which provides this module, blah blah blah

I recall a conversation I had with a former co-employee of this biotech company I used to work for who was leaving to go on to other things. I asked her at what stage her projects that she was leaving were at, and she replied "the giving up stage". That's how I feel about this. I can still upgrade with apt, or I can just re-install 4.2 (or go straight to 4.3), but trying to fix up2date seems to be an insurmountable problem. Granted, it was my fault for messing around with python in the first place, as I mentioned in my first post, but I have to plead innocent in the court of mistaken upgrades because my experience with python was as an add-on scripting language for IRIX. It was great for everything from manipulating text files to creating new molecular modeling software, but it was most definitely not an integral part of the OS, as it appears to be for RHEL/CentOS.
Maybe CentOS should come with virtual warning label (kind of like for cigarrettes) that states WARNING:MESSING WITH YOUR PYTHON INSTALL COULD MESS UP OTHER APPLICATIONS. Thanks for your help with this but unless someone else out there who's been following this thread (Anyone?) has a suggestion, it seems like up2date will remain broken.

Lenard
Posts: 2283
Joined: 2005/11/29 02:35:25
Location: Indiana

Re: Help!! Honey I broke the python! (CentOS 4.2, python 2.3.4)

Post by Lenard » 2006/03/27 03:02:04

[quote]
It seems like I have all the packages you mentioned, though not all at quite the same version level. yum *is* broken, to wit:
#yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named cElementTree
[/quote]

I have had this error myself due to my custom installation, the fix is fairly easy. Download the source rpm for yum and rebuild it;

rpm --rebuild yum-2.4.2-2.centos4.src.rpm

Then installed the just built binary rpm;

rpm -Uvh /usr/src/redhat/RPMS/noarch/yum-2.4.2-2.centos4.noarch.rpm --force

yum should work after this.

FYI: I tired with same versions of the files you listed and got the same errors as you, try installing the same versions I listed. Afterall what can it hurt????? up2date is broken!

Of course use the i386 or whatever version for your installation, once more the list;

From Fedora Core 5; rhnlib-2.0-1.p24.3.1.noarch.rpm
From Fedora Core 4; pyOpenSSL-0.6-1.p24.4.1.x86_64.rpm rhpl-0.167-1.x86_64.rpm
From CentOS-4.3; up2date-4.4.67-4.centos4.x86_64.rpm up2date-gnome-4.4.67-4.centos4.x86_64.rpm

I am glad at least apt works, this way you can stay updated.

As a warning playing with glibc is even worse, you can kill or at the very least greatly humble the system(you might say my rpm is broken!).

lshekter
Posts: 9
Joined: 2006/03/20 03:06:19
Location: Toronto, Canada

Re: Help!! Honey I broke the python! (CentOS 4.2, python 2.3.4)

Post by lshekter » 2006/03/27 03:14:14

Yeah, I'd already tried rebuilding yum 2.4.2 from source, as many posts have suggested (even the yum FAQ). But believe it or not, that doesn't solve the problem! yum still doesn't work, only now the error is different:

#yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.3.4 (#1, Mar 10 2006, 06:12:09)

Lenard
Posts: 2283
Joined: 2005/11/29 02:35:25
Location: Indiana

Re: Help!! Honey I broke the python! (CentOS 4.2, python 2.3.4)

Post by Lenard » 2006/03/27 12:05:27

I thinking your idea to re-install CentOS-4.2/3 cleanly is sounding better.

As a test I did 'rpm -e python --test' and got a fairly large list of packages that are dependent on python.

jdonz
Posts: 32
Joined: 2006/03/05 20:35:34
Location: Phoenix

Re: Help!! Honey I broke the python! (CentOS 4.2, python 2.3.4)

Post by jdonz » 2006/03/27 20:58:28

Just out of curiousity, have you tried to rebuild the rpm database? I'm wondering if the DB is broken.
[code]
root@server ~]# rpm --initdb
[/code]

lshekter
Posts: 9
Joined: 2006/03/20 03:06:19
Location: Toronto, Canada

Re: Help!! Honey I broke the python! (CentOS 4.2, python 2.3.4)

Post by lshekter » 2006/03/31 02:32:33

OK. I rebuilt the rpm database (I think the switch is --rebuilddb not --initdb which according to the man pages creates the database initially, but perhaps I misread that). I tried everything again but still nothing works. I am now running CentOS 4.3 courtesy of apt, though I would prefer to fix up2date and yum.

nivl4
Posts: 1
Joined: 2006/04/12 05:49:45

Re: Help!! Honey I broke the python! (CentOS 4.2, python 2.3.4)

Post by nivl4 » 2006/04/12 07:05:53

Here's what I did to fix yum and up2date, hope it helps.

Fix yum:
1. ln -s /usr/bin/python2.4 /usr/bin/python
2. rebuild yum from source
wget http://mirrors.kernel.org/centos/4/os/SRPMS/yum-2.4.2-2.centos4.src.rpm
rpmbuild --rebuild yum-2.4.2-2.centos4.src.rpm
rpm -Uvh --force /usr/src/redhat/RPMS/noarch/yum-2.4.2-2.centos4.noarch.rpm

3. Install following
rpm-python24-4.4.2.4-1.el4.pyv.i386.rpm
libxml2-python24-2.6.22-1.el4.pyv.i386.rpm
python24-elementtree-1.2.6-5.el4.pyv.i386.rpm
python24-sqlite-1.1.6-1.1.el4.pyv.i386.rpm
python24-urlgrabber-2.9.6-3.py24.noarch.rpm

wget http://www.python.org/pyvault/centos-4-i386/rpm-python24-4.4.2.4-1.el4.pyv.i386.rpm
wget http://www.python.org/pyvault/centos-4-i386/python24-elementtree-1.2.6-5.el4.pyv.i386.rpm
wget http://www.python.org/pyvault/centos-4-i386/python24-urlgrabber-2.9.6-3.py24.noarch.rpm
wget http://www.python.org/pyvault/centos-4-i386/libxml2-python24-2.6.22-1.el4.pyv.i386.rpm
wget http://www.python.org/pyvault/centos-4-i386/python24-sqlite-1.1.6-1.1.el4.pyv.i386.rpm

Fix up2date:
Install following
rhnlib-2.0-1.p24.3.1.noarch.rpm
rhpl-python24-0.151-1_2.el4.at.i386.rpm

wget ftp://fr2.rpmfind.net/linux/fedora/core/5/i386/os/Fedora/RPMS/rhnlib-2.0-1.p24.3.1.noarch.rpm
wget ftp://ftp.pbone.net/mirror/atrpms.net/el4-i386/atrpms/stable/rhpl-python24-0.151-1_2.el4.at.i386.rpm

JibMac
Posts: 1
Joined: 2007/07/07 00:08:28
Contact:

Re: Help!! Honey I broke the python! (CentOS 4.2, python 2.3.4)

Post by JibMac » 2007/07/07 00:31:40

Just as an FYI, I foobar'd my yum install by upgrading my elementtree as recommended by rpmforge.

A

wget http://www.python.org/pyvault/centos-4-i386/python24-elementtree-1.2.6-5.el4.pyv.i386.rpm
rpm -i python24-elementtree-1.2.6-5.el4.pyv.i386.rpm

completely fixed it for me.

Thanks for the help.

/I registered just to post that info.
//Hope it helps someone else.

Regards,

Rick

Post Reply

Return to “CentOS 4 - Miscellaneous Questions”