Latest LQ Deal: Latest LQ Deals
Go Back > Linux Answers > Applications / GUI / Multimedia
User Name


By GufyMike at 2004-06-04 12:33

My name is Mike and I use Fedora Core 2 as my main OS at home and for work, I also use RH9 at work, along with FreeBSD. When updating or installing software on the RH9 and FreeBSD, I do it remotely, for the most part all the software I need is on the default install of the distro I'm using, but occasionally (especially for my home PC) I need to install some applications not included on the Distro CDs. For example mp3 support for FC2.

For you apt or apt-get users, yum is just as powerful as apt. I like it because its included with the RH and FC Distros and there is no need to download another application to do the same thing. I will say this the only thing that I have found out apt has and yum doesn't is a GUI. I will address that at the end.

Now the only option/switch I use every time I use yum is -y. -y will tell yum to say yes to all questions.

First off yum use a file (/etc/yum.conf) to keep track of repositories to search for applications. The default yum.conf has only 2 or 3 repositories for updating its distro. For Example FC2 has these default entries:

name=Fedora Linux $releasever - $basearch - core
name=Fedora Linux $releasever - $basearch - updates
name=Fedora Linux $releasever - $basearch - freshrpms

#name=Fedora Linux $releasever - $basearch - testing updates
I add these entries to those:
[livna-stable] Fedora Compatible Packages (stable)

name=Fedora US $releasever - $basearch - Latest Packages

name=Fedora Core 2

name=Dag RPM Repository for Fedora Core 2

name=Extra Fedora rpms dries - $releasever - $basearch
Those extra repositories act as a backup to my default ones if those servers aren't available and also contain applications not available with the distro. Also they will have an entry for your distro (if applicable) to add to your yum.conf listed on their sites.

Once those are added to your yum.conf you can now update the headers for your distro by entering:
yum -y check-update
That will only download headers for new updates or software available. If you haven't ran yum check-update yet it will take a bit depending on the amount of headers needed to download.

This command will not only update the headers but also download and install any updates available:

yum -y update
You can also specify a specific package to update by typing:

 yum -y update <package name>
after updating the one command (besides installing a package) i continuously us is:

yum -y list
That will display a list of packages available for install. I usually redirect the output using the (>) redirection operator.

yum -y list > packageslist
If I want to see whats installed on my system, this is the command I use.

yum -y list installed
To install a new package I first use the list option to see whats available and then type:

yum -y install <package name>
Working example: yum -y install mplayer will download and install mplayer. Whats nice about yum and apt is that they will resolve dependencies. If you don't have a dependency and its available in your list of repositories yum will download it and install it for you automatically. If its not available then you will have to search for it and install it manually first then continue with yum.

If you now a packages name and want to know if its available with out searching through the list?

yum -y search <package name>
This will search your repositories for a matching package.

yum -y info package name
This will provide you with a full detail and summary on a package.

To remove or uninstall a package:

yum -y remove ,package name>
OK yum will download the packages but will not delete them after install/upgrade and will not delete old headers.

Simply type
yum -y clean
I hope this heps some of you when installing /updating your software. There are a few more options that yum provides (for the most part variations of ones stated here.) by typing:

man yum
That will give you the man page on yum with more options. now IU haven't had a problem installing anything or updating except when a dependency hasn't been packaged yet. For example to update to php I need to remove some php-* because they aren't available yet and require

Example php-mmcache needs and not compatible with

So I'll wait. Now one last little thing if you want to install more than package using yum -y install. You CAN.

This will download and install mplayer, boson, and cssed in one shot:

yum -y  install mplayer boson cssed
I have a small bash script for yum and rpm (RPM queries are used to supplement yums). yummenu contains all the commands I have included here and some more. It will download and install yum and RPM from sources if you can't have them available and has the yum.conf I use for FC2 and RH9

Any questions, contribs, corrections go ahead and let me know.

by mjbrej on Wed, 2004-12-08 00:07
I have been a user of up2date exclusively up til now. But your summary has convinced me that I might want to dip my toes into yum a little bit. Thanks for laying out the basics for us newbies!

by wongster on Wed, 2004-12-15 05:32
Hi folks,

any changes I need to adjust for FC3? I did not see a lot of stuff in FC3's default as compared to the one listed in the article.


by rarsa on Tue, 2005-03-01 22:46

Nice article. I've been using yum on top of up2date. actually I let up2date let me know when there are Fedora Core 3 updates and then I use yum to update.

Here is a problem I am having right now:
I have added the dag repository and installed some packages from there.
Recently I installed monodevelop from the official mono repository.
it installs the following packages
Transaction Listing:
Install: monodevelop.i386 0:0.5.1-1.novell.9.1

Performing the following to resolve dependencies:
Install: gecko-sharp.i386 0:0.6-1.novell.9.1
Install: gtk-sharp.i386 0:1.0.6-0.novell.9.1
Install: gtksourceview-sharp.i386 0:0.5-1.novell.9.1
Install: mono-core.i386 0:1.0.6-1.novell.9.1
Install: mono-data.i386 0:1.0.6-1.novell.9.1
Install: mono-web.i386 0:1.0.6-1.novell.9.1
Install: monodoc.i386 0:1.0.5-1.novell.9.1
dag also has some mono related packages (mono-core, gtk-sharp, etc).
When I do a 'yum update' with the dag repository enabled yum complains about missing dependencies and it fails to update any of the packages (from any repository)
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package monodoc.i386 0:1.0.5-1.1.fc3.rf set to be updated
---> Package mono-data.i386 0:1.0.6-1.1.fc3.rf set to be updated
---> Package mono-web.i386 0:1.0.6-1.1.fc3.rf set to be updated
---> Package gecko-sharp.i386 0:0.6-1.1.fc3.rf set to be updated
---> Package monodevelop.i386 0:0.5.1-3.1.fc3.rf set to be updated
---> Package mono-core.i386 0:1.0.6-1.1.fc3.rf set to be updated
---> Package gtksourceview-sharp.i386 0:0.5-1.1.fc3.rf set to be updated
--> Running transaction check
--> Processing Dependency: mono(System) = 1.0.5000.0 for package: gtk-sharp
--> Processing Dependency: mono(mscorlib) = 1.0.5000.0 for package: gtk-sharp
--> Processing Dependency: mono(System.Xml) = 1.0.5000.0 for package: gtk-sharp
--> Finished Dependency Resolution
Error: missing dep: mono(System) = 1.0.5000.0 for pkg gtk-sharp
Error: missing dep: mono(mscorlib) = 1.0.5000.0 for pkg gtk-sharp
Error: missing dep: mono(System.Xml) = 1.0.5000.0 for pkg gtk-sharp

My 'solution' for now was the following:
Disable the dag repository
yum update (to update all the packages that are not in dag)
yum remove monodevelop (to avoid package conflicts with dag)
yum --enablerepo=dag update (to update all the packages I got from dag)
yum --enablerepo=go-mono install monodevelop (to reinstall the monodevelop packages)

that solved my problem for now. But the question is: Is there a way to tell YUM that if there is a conflict for the mono packages always favor the mono official site?

by rarsa on Tue, 2005-03-01 22:52
Forget the previous question. Two seconds after sending it I figured out the answer: Here it is for anyone to read it:

When the same package exists in two repositories with different versions and you want to force YUM to always update from one of them: exclude the packages from the other repository.

In my example I explicitly excluded the offending packages from the dag repository by adding an exclude option to the dag.repo file (or to the dag section of the yum.repo):

name=Dag RPM Repository for Fedora Core
exclude=mono* gecko-sharp gtksourceview-sharp

I hope this can save some time to someone else

by ashwin_cse on Thu, 2005-03-10 03:16
I think article has become a little outdated. FC3 uses /etc/yum.repo.d/[different .repo files].

by 2hawks on Fri, 2005-03-11 20:49
Seeings how everyone is up on YUM, I have a question for ya.

Has anyone been able to get YUMI to work ??

Every time I launch it I get the following errors:

Could not setup settings tab. needs mods.
Insufficient server config - no servers found. Aborting.

What is it looking for ??

by abhijeetudas on Wed, 2005-04-06 00:49
Thanks for a excellent How-to.

I have a bunch of machines running FC3, & i just downloaded all the FC# updates on one of the machine
is it possible to use this machine as a update server for the other machines?
so that they dont need to be updated via internet & can be updated much faster..


by rarsa on Wed, 2005-04-06 13:40
This is one of the great advantages of Yum:

You can set-up your own Yum server and configure all other computers to use this one as the default repository.

Here is an article that explains how to exactly what you are asking for:

I hope this helps.


by Gamezace on Fri, 2005-06-03 14:58
Originally posted by ashwin_cse
I think article has become a little outdated. FC3 uses /etc/yum.repo.d/[different .repo files].
While you can do it this way, FC3 still supports adding the repositories to the /etc/yum.conf file.

by crazyfuzzy on Wed, 2007-01-24 11:53
Originally Posted by mjbrej
I have been a user of up2date exclusively up til now. But your summary has convinced me that I might want to dip my toes into yum a little bit. Thanks for laying out the basics for us newbies!

I just installed fedora core 6 first two cd but now i am trying to install the 3rd cd which i downloaded from the fedoraweb site its saying the same thing "cannot execute binary file"

Also I used the Yum option to up date the software

Also I dont know how can I install gcc because I know the 3rd cd comes with built in GCC... Can you please guide me...

Thank you


All times are GMT -5. The time now is 12:48 AM.

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