LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I Killed Yum. (https://www.linuxquestions.org/questions/linux-newbie-8/i-killed-yum-388670/)

Wheat_Thins 12-02-2005 01:59 PM

I Killed Yum.
 
:cry: :cry: I was trying to add some repositories but was only getting errors with every single repositoriy I added to the yum config file, So I tried deleting anything that I added and it still was broke when trying to use yum it would always check a different mirror and fail, well anyways thats old problems. I removed yum and wanted to reinstall it, so I downloaded the YUM rpm straight from fedora's ftp server. After the install of the RPM, I run Yum from the terminal and this is the error that I get:

[xxx@LinuxBed ~]$ yum
Traceback (most recent call last):
File "/usr/bin/yum", line 22, in ?
import yummain
ImportError: Bad magic number in /usr/share/yum/yummain.pyc
[xxx@LinuxBed ~]$

This file is some type of python file that I cannot view because it is object code. Is there anyways I can start all over, and how would I go about this? I have Yum files scattered all over and its a real mess, have I fubared my yum possibilities for good?
A couple other questions:

How do you remove packages that install with RPMS from the terminal? I know with yum you can remove things because it keeps track of what has been installed, is there any way of doing this if the RPM was installed from the terminal with RPM -i command?

How come the forum does not subcribe me to my own threads I make? It makes it hard to keep track of them because I have to bookmark everything instead of using my user profile page that is supposed to list them?

Sorry I'm such a :newbie:

homey 12-03-2005 12:35 PM

I would find out what yum you have installed with
rpm -qa | grep yum

then, remove it using the correct info from previous command...
rpm -e yum-bunch-of-numbers

then, remove the yum related stuff...
rm -rf /var/cache/yum
rm -rf /etc/yum.repos.d
rm -f /etc/yum.conf

Next, re-install yum from the rpm which you have downloaded. Make sure to have the version designed for FC4


You can use yum to remove rpm files which are installed locally and you can use yum to install local rpm files.
yum --help and man yum are good for examples.

Wheat_Thins 12-16-2005 10:53 AM

Quote:

Originally Posted by homey
I would find out what yum you have installed with
rpm -qa | grep yum

then, remove it using the correct info from previous command...
rpm -e yum-bunch-of-numbers

then, remove the yum related stuff...
rm -rf /var/cache/yum
rm -rf /etc/yum.repos.d
rm -f /etc/yum.conf

Next, re-install yum from the rpm which you have downloaded. Make sure to have the version designed for FC4


You can use yum to remove rpm files which are installed locally and you can use yum to install local rpm files.
yum --help and man yum are good for examples.

Ok, I have tried everything that you said. Now when I go to install the new RPM for Fedora Core 4 I get the following error:

[xxx@LinuxBed Desktop]$ ls
user-guide-us.pdf yum-2.4.0-63.rhfc4.at.i386.rpm
[xxx@LinuxBed Desktop]$ su -c 'rpm -i yum-2.4.0-63.rhfc4.at.i386.rpm'
Password:
warning: yum-2.4.0-63.rhfc4.at.i386.rpm: Header V3 DSA signature: NOKEY, key ID 66534c2b
error: Failed dependencies:
/etc/yum.conf is needed by yum-2.4.0-63.rhfc4.at.i386
[xxx@LinuxBed Desktop]$

So it looks like I am missing the yum.conf file. I recreated this file and threw in some of the default repositories. I still get the same exact error even with the /etc/yum.conf file present on the system.

Any ideas???

Thanks for the Help!

Wheat_Thins 12-16-2005 11:28 AM

I was able to fix it and have it install correctly with moving up to the newest version (Which I don't believe was available when I first posted)

This is the RPM that did it for me if anybody else is unlucky enough to mess up thier yum:

yum-2.4.1-1.fc4.noarch.rpm

Now what killed my Yum in the first place,

I have tried to use google as much as possible and read manuals and such but every attempt has seem to break my yum when trying to add repositories, can anybody please aid me in doing this? I would like to use the official FC4 repositories and also a couple others that will give me some of the better options of Mplayer and other goodies that are not on the FDC servers.

nlkrio 03-02-2006 01:13 PM

http://stanton-finley.net/fedora_cor...tes_nocss.html
use Stanton Finley's yum configuration


All times are GMT -5. The time now is 02:08 PM.