LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-11-2009, 03:09 AM   #1
seeker48
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Rep: Reputation: 0
my "yum" got erased


Hello, I am a linux newby and having tasted the goodies of Fedora 9, I am now a very convinced linux wannabe.

The sense of control in the type and execute is, to tell the tale , a great ride and having found just what a chum yum could be, I yummed a lot of installs – yum presto too.

Since I found yum Presto is too pronto in its execution and does not really update effectively, to get rid of this part of the otherwise most excellent yum , as root I executed the command :-
“yum erase yum presto”

Yum erased a lot of stuff more and beyond yum presto.

Now if I execute any “yum” command such as “yum update”, the terminal returns the message:-

bash: yum: command not found

Please help me out of this mess
 
Old 03-11-2009, 05:00 AM   #2
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
Quote:
Originally Posted by seeker48 View Post
“yum erase yum presto”
I'm afraid you've uninstalled yum. yum erase yum-presto would have done what you want, but with a space instead of a hyphen, yum saw two things to remove: yum itself and "presto" (which doesn't exist - the package's name is yum-presto). The power of the command line is great, as you say, but it can be dangerous!

At this point, the quickest thing to do might be to reinstall Fedora. But before you "go nuclear", we can have a go at reinstalling yum. You can download the package directly from here:
http://download.fedora.redhat.com/pu...fc9.noarch.rpm

But pick the correct architecture for your system (post the output of uname -i if you're not sure) - that's the i386 version.

That file is what yum would download if it were installing the package automatically, but you can install it yourself with
Code:
rpm -ivh yum-3.2.14-10.fc9.noarch.rpm
This is an older way of installing things. The disadvantage is that rpm can't go online and find other packages that yum depends on (that's what's so great about yum and other package managers), so you may get a "failed dependency" error if yum also erased other packages on which it depended. With a bit of patience you should be able to sort it out though, all the dependencies will also be available as rpm files from the URL above. If you get a failed dependency error, just keep installing the required packages until you can install yum!

Hope that's clear, post the output of the rpm command if you can't get it to work.


PS: there are a lot of other packages whose names begin with "yum" that you'll also have erased. Once you've got yum installed, you probably want to install those too. The ones on my system (F8) are:
yum-fedorafaq
yum-metadata-parser
yum-priorities
yum-updatesd
yum-utils

and AFAICR all of those were installed by default when I installed Fedora, except possibly yum-priorities.

Last edited by openSauce; 03-11-2009 at 05:24 AM.
 
Old 03-11-2009, 05:02 AM   #3
Maligree
Member
 
Registered: Mar 2008
Distribution: Gentoo, CentOS, Fedora, Arch
Posts: 231
Blog Entries: 1

Rep: Reputation: 42
Just grab a yum rpm package from any of the Fedora mirrors (this one, for example) and install it with..
Code:
rpm -ivh yum-<version>.rpm
It's possible that rpm will complain about missing dependancies - if it does (I'm not sure if yum depends on any other packages apart from rpm and wget/curl which it uses for downloading and installing) you'll also have to pull those missing rpm packages from the mirror and install them via rpm -ivh just like above.

I hope this is clear.
 
Old 03-11-2009, 07:51 AM   #4
seeker48
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Post

Quote:
Originally Posted by openSauce View Post
I'm afraid you've uninstalled yum. yum erase yum-presto would have done what you want, but with a space instead of a hyphen, yum saw two things to remove: yum itself and "presto" (which doesn't exist - the package's name is yum-presto). The power of the command line is great, as you say, but it can be dangerous!

At this point, the quickest thing to do might be to reinstall Fedora. But before you "go nuclear", we can have a go at reinstalling yum. You can download the package directly from here:
http://download.fedora.redhat.com/pu...fc9.noarch.rpm

But pick the correct architecture for your system (post the output of uname -i if you're not sure) - that's the i386 version.

That file is what yum would download if it were installing the package automatically, but you can install it yourself with
Code:
rpm -ivh yum-3.2.14-10.fc9.noarch.rpm
This is an older way of installing things. The disadvantage is that rpm can't go online and find other packages that yum depends on (that's what's so great about yum and other package managers), so you may get a "failed dependency" error if yum also erased other packages on which it depended. With a bit of patience you should be able to sort it out though, all the dependencies will also be available as rpm files from the URL above. If you get a failed dependency error, just keep installing the required packages until you can install yum!

Hope that's clear, post the output of the rpm command if you can't get it to work.


PS: there are a lot of other packages whose names begin with "yum" that you'll also have erased. Once you've got yum installed, you probably want to install those too. The ones on my system (F8) are:
yum-fedorafaq
yum-metadata-parser
yum-priorities
yum-updatesd
yum-utils

and AFAICR all of those were installed by default when I installed Fedora, except possibly yum-priorities.
-------------------------------------------------------------------------
Many thanks for the detailed suggestion and the earnest mind behind your suggestion and thank you too "Maligree"

So I clicked on the link that you had provided and downloaded the package and then executed the suggested command.

The terminal replies as follows:-

"error: open of yum-3.2.14-10.fc9.noarch.rpm failed ; No such file or directory"

Have I indeed done precisely that you have so kindly suggested? Is there
any thing else to try, before I commit harakiri?!

Thanks again and my best regards
 
Old 03-11-2009, 08:00 AM   #5
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
The rpm command has to be issued in the directory which contains the .rpm file (or you have to give the full path to the file).

Also, please confirm that the output of uname -i is i386 before installing the file.
 
Old 03-11-2009, 08:01 AM   #6
John-in-France
Member
 
Registered: Jun 2006
Posts: 65

Rep: Reputation: 15
My suspicion - You're in the wrong directory. (Been there several times myself!)

When you downloaded the package, where did you save it? Make sure you are in that directory before running rpm.

John
 
Old 03-11-2009, 09:55 AM   #7
battletroll
Member
 
Registered: Dec 2004
Location: Alabama
Distribution: Slackware, Solaris,Fedora, CentOS, Redhat, SGI
Posts: 65

Rep: Reputation: 18
rpm

You can also run rpm -ivh http://mirrors.usu.edu/fedora/linux/...fc9.noarch.rpm
 
Old 03-12-2009, 12:21 AM   #8
seeker48
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Original Poster
Rep: Reputation: 0
To:- John In France - Thanks.
1. the file was downloaded by the browser to home/downloads.
2. how do I go to that directory to run rpm from there?

To:-Battle Roll - I ran the rpm command you suggested :-

the terminal replies "skipped download - unknown error

Regards

Seeker48
 
Old 03-12-2009, 03:02 AM   #9
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
Quote:
Originally Posted by seeker48 View Post
1. the file was downloaded by the browser to home/downloads.
2. how do I go to that directory to run rpm from there?
cd downloads from your home directory, or cd ~/downloads from anywhere. pwd will tell you your current directory, ls will list the files in the current directory. Remember when you type the rpm command that file names are case-sensitive (don't use capitals unless they're there in the filename).
 
Old 03-12-2009, 07:20 AM   #10
seeker48
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Original Poster
Rep: Reputation: 0
To Opensauce

Both sugggestions in the terminal as "root" return "no such file or directory"

Now I seem to be really "firefoxed"!!!
 
Old 03-12-2009, 07:36 AM   #11
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
You have a knack for finding just the right way to prevent our suggestions from working . Not blaming you (or me or the others), it's just that bash (the shell program which is interpreting your commands) is complex, and when you're used to it it's hard to think of every little step to guide a newbie through it.

The ~ character expands to the home directory of the current user. So cd ~/downloads will work when you're logged in as yourself, but if you're logged in as root then ~ expands to root's home - not where you want to be. The actual path to your home dir is /home/yourusername, so you can use that instead of ~ when you're logged in as root. By the way, remember that file names are case-sensitive - are you sure it's downloads and not Downloads?

You might want to google around for a tutorial on the basics of bash - this one looks alright. If you're having trouble finding files and directories, use pwd to find out where you are and ls to see what files are in the current directory. Depending on your distro, subdirectories will hopefully come up in a different colour from regular files so you can see which ones you can cd into. If there's no colour, use ls --color=auto.

What's the output of uname -i please?
 
Old 03-12-2009, 07:38 AM   #12
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191

Rep: Reputation: 49
I guess opensauce missed the Caps in downloads,

try
Quote:
cd ~/Downloads
ls -l *.rpm
see if the file you downloaded is there, then do a
Quote:
rpm -ivh yum-3.2.14-10.fc9.noarch.rpm
or whatever the filename is.

Please paste in the errors that you get, so that we understand the exact problem and provide a better solution.
 
Old 03-13-2009, 12:59 AM   #13
seeker48
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Thank you and all of you,

OpenSauce U done cooked my goose!!!

Senior Memeber - i dare'nt attempt a write of your name!

I will take the suggestion of looking up the suggested tutorial and the the other options.

Really appreciate your kind gesture - all of you

seeker48

P.S:- (I hope it won't be a case of "lost for ever" beyond 48)
 
Old 03-18-2009, 06:45 AM   #14
seeker48
LQ Newbie
 
Registered: Mar 2009
Posts: 17

Original Poster
Rep: Reputation: 0
Talking

Quote:
Originally Posted by w3bd3vil View Post
I guess opensauce missed the Caps in downloads,

try

see if the file you downloaded is there, then do a

or whatever the filename is.

Please paste in the errors that you get, so that we understand the exact problem and provide a better solution.
-------------------------------------------------------------------------

Having sought the light of TUTs as suggested so kindly by OPENSAUCE, and one what the SeniorMemeber suggested, the terminal replies:- error: can't create transaction lock on /var/lib/rpm/_db.000

What next folks?
 
Old 03-18-2009, 06:54 AM   #15
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
Quote:
Originally Posted by seeker48 View Post
OpenSauce U done cooked my goose!!!
I don't know what that means, but I hope it's nothing bad!



Quote:
Originally Posted by seeker48
error: can't create transaction lock on /var/lib/rpm/_db.000

What next folks?
That means you haven't told us the output of uname -i
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to reinstall Windows after "erased" and encrypted Fedora 9 installation famdabur General 3 01-27-2009 07:13 AM
Is there an "apt-get" equivalent of "yum list available"? geeeeky.girl Linux - General 3 07-20-2008 08:40 PM
Difference betweenn "yum install" and "yum update" john lee Linux - Newbie 1 02-11-2008 11:26 PM
Post back , How to get "yum" and "ndiswrapper" to work? BootLaptop Linux - Wireless Networking 1 07-17-2007 08:27 PM
How to correct "yum" and "modprobe" when using ndiswrapper? BootLaptop Linux - Wireless Networking 2 07-15-2007 07:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration