LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Python problems with FC5 (https://www.linuxquestions.org/questions/fedora-35/python-problems-with-fc5-480624/)

saywot 09-05-2006 10:56 AM

Python problems with FC5
 
I have been getting error messages when I use the command
yum-y update.

Quote:

[root@usaidwot saywot]# yum -y update
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
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.4.1 (#2, Nov 11 2005, 12:26:27)
[GCC 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)]
which is odd as I seem to have installed a Mandriva Linux component and this is FC5.

Also when I download and have run rpm -ivh Python-2.4.x.x.x.FC5.i386.rpm
I get you have already installed this

and the same applies to installing YUM

How can I get rid of the Mandriva components and replace with the appropriate Fedora Core equivalents

saywot 09-05-2006 09:53 PM

Here's the message I get when I try and install a later (FC5) version of Python

Quote:

[root@usaidwot saywot]# rpm -ivh python-2.4.3-8.FC5.i386.rpm
Preparing... ########################################### [100%]
package python-2.4.3-8.FC5 is already installed

saywot 09-05-2006 09:58 PM

and, of course, the same applies to YUM

Quote:

[root@usaidwot saywot]# rpm -ivh yum-2.6.1-0.fc5.noarch.rpm
Preparing... ########################################### [100%]
package yum-2.6.1-0.fc5 is already installed
So while I can blame myself for doing things to my computer waaaay past my bedtime I would have thought a simple

Quote:

rpm -e [package-name]
should remove all of python - but NO ! :confused:

saywot 09-06-2006 05:50 AM

Latest news

Quote:

# rpm -e python2.4.1
error: package python2.4.1 is not installed
# rpm -e Python2.4.1
error: package Python2.4.1 is not installed
#
But when I do (as the super user)
rpm -ivh python-2.4.3-8.FC5.i386.rpm

Quote:

# rpm -ivh python-2.4.3-8.FC5.i386.rpm
Preparing... ########################################### [100%]
package python-2.4.3-8.FC5 is already installed
So V 2.4.1 is not installed
but V 2.4.3 is

YUM needs python to work and the command I use to update all the packages is
yum -y update
so when I use this (again as su) I get


Quote:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
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.4.1 (#2, Nov 11 2005, 12:26:27)
[GCC 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)]

So that which doesn't exist does indeed but that which shouldn't does
The package I'm trying to remove isn't there
the package I'm trying to install is already installed

saywot 09-07-2006 01:31 AM

I'm starting to think that my only solution is to do a complete re-install of Core 5.

I have looked through all of /etc and found nothing called (or resembling) python 2.4.1 there
have looked through /usr with the same result

Where else should I be looking as (apart from this) I have the machine running everything I wanted above my expectations ?

:cry: :cry:

decrepit 09-07-2006 04:04 AM

Have you tried yum clean all
It's a long shot, but may help, before you try a reinstall.

saywot 09-07-2006 09:14 AM

Well if

yum -y update

returns an error message of "Yum is not installed"

Quote:

yum clean all
will probably return the same message won't it ?

something like


Quote:

# yum clean all
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
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.4.1 (#2, Nov 11 2005, 12:26:27)
[GCC 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)]

decrepit 09-07-2006 10:19 AM

woops, sorry didn't mean to increase your frustration, guess i should have read a bit more carefully.

saywot 09-11-2006 01:51 AM

Latest --

#updatedb --(wait a few minutes)
#locate python

this gives me the location of the file I don't want
remove the file
replace with Python 2.4.3 FC5
installs like a charm !! - (briefly happy and hopeful)

This all started because I was unable to update anything because of the incorrect version of Python now this has been solved I expected the problem to have cleared up

But

Quote:

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

No module named rpm

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.4.3 (#1, Jun 13 2006, 11:46:08)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)]
So now rpm has gone and I'm no better off (except I do have python 2.4.3 FC5 installed)

reddazz 09-11-2006 03:56 AM

You hosed python, yum and rpm by installing Mandriva packages on Fedora Core. Whilst Mandriva and Fedora Core share the same basic package management system, their packages are not compatible. Since rpm is hosed and there is not way to reinstall yum, python and rpm a complete OS reinstall maybe necessary.

saywot 09-11-2006 10:41 AM

Quote:

]# rpm -ivh rpm-4.4.2-15.2.i386.rpm
Preparing... ########################################### [100%]
package rpm-4.4.2-15.2 is already installed
Which leads me ...
with the greatest reluctance to accept this as sage advice

Quote:

You hosed python, yum and rpm by installing Mandriva packages on Fedora Core. Whilst Mandriva and Fedora Core share the same basic package management system, their packages are not compatible. Since rpm is hosed and there is not way to reinstall yum, python and rpm a complete OS reinstall maybe necessary.

but
Since I have re-installed the correct python package, the correct yum package what's the impediment to fixing rpm ? :confused:

reddazz 09-11-2006 04:22 PM

Since rpm seems to be somehow working, try doing
Code:

# rpm -Uvh --nodeps --force rpm-4.4.2-15.2.i386.rpm
Make sure you use the latest rpm available from the updates section in the Fedora Core mirrors. Also make sure your reinstall the rpm-python package.

saywot 09-11-2006 09:10 PM

This looked good so I tried it

Quote:

# rpm -Uvh --nodeps --force rpm-4.4.2-15.2.i386.rpm
Preparing... ########################################### [100%]
1:rpm ########################################### [100%]
# yum -y update
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named rpm

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.4.3 (#1, Jun 13 2006, 11:46:08)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)]
OK so rpm forced itself

Now to the latest python from the fedora core repository
so python forced itself

But to no avail the report is still

"no module named rpm"

So I'm still at a loss :(

reddazz 09-12-2006 03:12 AM

Did you read the last bit of the post that talks about rpm-python? :)

saywot 09-12-2006 09:54 PM

Quote:

# rpm -ivh python-2.3.4-13.1.i386.rpm
error: Failed dependencies:
libdb-4.2.so is needed by python-2.3.4-13.1.i386
libreadline.so.4 is needed by python-2.3.4-13.1.i386
So should I install the dependencies OR do the "nodeps" thing


All times are GMT -5. The time now is 12:32 PM.