LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Yum issues (https://www.linuxquestions.org/questions/linux-software-2/yum-issues-722107/)

firemangreg 04-27-2009 08:02 PM

Yum issues
 
I was getting a segmentation fault whenever I would run yum anything. There would be no output, just a segmentation fault. I removed yum and just reinstalled it via and rpm. The following is the output I now get:


[Greg@localhost ~]$ yum 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 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.5.2 (r252:60911, Sep 30 2008, 15:41:38)
[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq


Any help would be appreciated, thanks.

-Greg

jphilput 04-28-2009 07:49 AM

When Yum is installed as part of the OS install, there are generally several Yum RPMs installed at the same time that give it the full functionality. It is possible that in reinstalling Yum, you have inadvertently installed a version that is incompatible with the components that remained on your system. Without knowing which distro you are running, I can't give you version specific help, but in general, I would suggest that you first run the following command to see which Yum packages you have installed.

Code:

# rpm -qa |grep yum
yum-3.2.8-9.el5.centos.2.1
yum-metadata-parser-1.1.2-2.el5
yum-updatesd-0.9-2.el5
yum-fastestmirror-1.1.10-9.el5.centos

Once you've done that, I would suggest pulling new copies of the RPMs that show up in your list from your distributions RPM repository. Once you have the new copies, remove the existing ones, and install the replacements. Once that is done, you should be able to use Yum again.

firemangreg 04-28-2009 03:19 PM

I am running Fedora Core 10. I downloaded the rpm for FC10 from rpmfind (I believe). I'm not at home right now so I can't give you that output, I'll edit this post with it when I get home.

Edit: Here's the output.

[root@localhost Greg]# rpm -qa |grep yum
anaconda-yum-plugins-1.0-3.fc10.noarch
yum-utils-1.1.19-1.fc10.noarch
PackageKit-yum-plugin-0.3.15-2.fc10.i386
yum-metadata-parser-1.1.2-10.fc10.i386
PackageKit-yum-0.3.15-2.fc10.i386

Edit 2: While looking at the yum faq I found where in earlier versions of yum the python error could mean that it was installed wrong. It mentioned using the python command to determine what the error actually was. Upon doing this I got the following output:

[root@localhost Greg]# python
Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38)
[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Segmentation fault

jphilput 04-29-2009 07:34 AM

Okay, I see one problem in the package list for Yum. The problem is that I don't see Yum itself. If you haven't already, go ahead and pull yum-3.2.20-3.fc10.noarch.rpm from RPMFind, and install it. That *may* help.

I say that because the second problem that I see is the Python segmentation fault. I am not a Python geek by any means, when I run the same command, I get the following output:

# python
Python 2.4.3 (#1, May 24 2008, 13:47:28)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

It may be that your Python install has a problem with it. Reinstalling Python might help, but it would certainly be a pain. At this point, if installing the Yum RPM doesn't improve things, I would take a look at some of the Python boards and see if they can help.

firemangreg 04-29-2009 02:44 PM

Ok, I'll try that when I get home. Thanks for all of the help.

Edit: Tried the reinstall, no luck. Guess it's off to the Python forum. It's weird, one day it worked, next day it doesn't.

saurabhchokshi 06-02-2009 11:09 PM

Hi,

I am getting strange problem with Yum.

I am working on Centos 5.3 with Linux Kernel 2.6.26. With this kernel, yum is working in a correct way.

However, when I upgrade the Linux Kernel 2.6.29 and then I got the segmentation fault when I use yum.

I got the segmentation fault when I use "yum --help".

If you have any idea, what is wrong with the Kernel 2.6.29 or do I need to include some kernel module to run this application successfully?
Thanks,
Saurabh


All times are GMT -5. The time now is 06:33 PM.