LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Broken YUM and Possibly Python (http://www.linuxquestions.org/questions/linux-software-2/broken-yum-and-possibly-python-814417/)

nikunjbadjatya 06-16-2010 12:14 AM

Broken YUM and Possibly Python
 
Hi,
http://pastebin.centos.org/33380
shows system related information.

* Python versions 2.4 and 2.6 both are installed.
* /usr/bin/python directs to python 2.6.5
* Also, /opt contains python3.1
* The ADD/REMOVE software GUI also has gone.

Q. Is my system beyond repair?
Q. How do I completely remove all available python versions and yum, then reinstall them again.?

Kindly Help.!

Thanks,
Nikunj
Bangalore, INDIA

subho.d 06-16-2010 12:42 AM

remove the package by
Quote:

rpm -qa |grep python
rpm -e ***
then install
rpm -ivh <new rpm >

nikunjbadjatya 06-16-2010 04:28 AM

I reinstalled python. Now I want to install YUM.The links are from centos "http://mirror.centos.org/centos-5/5/os/i386/CentOS/"
I have followed these steps.


$ rpm -Uvh yum-3.2.22-26.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
Preparing... ########################################### [100%]
1:yum-metadata-parser ########################################### [ 33%]
2:yum-fastestmirror ########################################### [ 67%]
3:yum ########################################### [100%]
error: unpacking of archive failed on file /usr/share/yum-cli/yumcommands.pyo;4c18976f: cpio: read failed - Bad file descriptor


$ yum
Traceback (most recent call last):
File "/usr/bin/yum", line 28, in ?
import yummain
File "/usr/share/yum-cli/yummain.py", line 34, in ?
from utils import suppress_keyboard_interrupt_message, show_lock_owner
ImportError: cannot import name suppress_keyboard_interrupt_message


$ rpm -q *yum*
package yum-3.2.22-26.el5.centos.noarch.rpm is not installed
package yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm is not installed
package yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm is not installed


What to do next?

nikunjbadjatya 06-17-2010 12:55 AM

Hi All,

I rectified the error finally.

With yum rpm, additional dependency rpm's also needs to be installed. Which I was missing.
There are 5 rpm's in total including yum rpm.
Downloaded from "http://mirror.centos.org/centos-5/5/os/i386/CentOS/", these are :
yum-3.2.22-26.el5.centos.noarch.rpm
yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
yum-utils-1.1.16-14.el5.centos.1.noarch.rpm
yum-priorities-1.1.16-14.el5.centos.1.noarch.rpm

Install all these ( as root )together with
Code:

$ rpm -ivh yum*
To check for installation run,
Code:

$rpm -qa yum-\*
The above five rpm's should come.

Thats it.!


All times are GMT -5. The time now is 04:34 AM.