April 22, 2010

Tweaking Fedora-11

Its been some weeks that I have posted something over here . Thanks to Fedora-11 installation process, I have been eating my head out for weeks now and fortunately ,finally I got a solution to my problem ;So I thoughtthis post would be useful to those working with F-11 and having a tough time. If you have a Fedora 11 - Leonidas version at your system and your system is connected to internet, probably there is every likely chance that you would face the problem that I have faced. Especially if you are using Yum for installation of any application or RPM files , you will find an error displayed on a small box which reads
"Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again"
Since I haven't been much into Linux internals , I had nothing but Google to depend on to know what that very statement meant.

Let me straight away get into the technical aspect of this problem. If you get in such a message while using Fedora-11, some of the reasons for this can be
1. Error in fedora.repos file
2. Proxy issues
3. Dns issues
4. Temporary server break down

Lets analyse each one of these issues.
1. Error in Fedora .repos file
Step-1-Open up a terminal and type in this command
"cd /etc/yum.repos.d"
Now you are in yum.repos.d folder within etc folder. yum.repos.d contains three files that deals with repository management. To be specific it contains those files which the system access when it has to update itself from the fedora repository.

Step-2-Now login as root and open the file fedora.repo-" vi fedora.repo"
In that particular file if the base url is commented using "#" , then uncomment that and then comment mirrorlist using "#"
Now your Fedora.repo would look like this

[fedora-debuginfo]
name=Fedora 11 - i386 - Debug
failovermethod=priority
baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/11/Everything/i386/debug/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-11&arch=i386
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386

Step-3-Save the file and your problem must be solved.


2.Proxy Issues
In case your internet connection is through a proxy, you can try this out.
Step-1-Open up a terminal and type in this command
"vi /etc/yum.conf" (Remember you have to be root to manipulate this file)

Step-2-Your yum.conf file would look like this

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

Now to access repository add these lines to your yum.conf file below the line installonly_limit=3

proxy=http://x.x.x.x:portno/
(your proxy domain name or ip along with the port no)
proxy_username=abcde (Your proxy username)
proxy_password=abcde (Your proxy password)

Step-3-Save the file and your problem must be solved.


3.DNS Isuues
You might even get an error due to DNS lookup failure. in that case , you can look into the following.
Step-1- Open the file "/etc/resolv.conf". This contains the list of name servers that is used by your system. Try adding another DNS server like 8.8.8.8 (Google Public DNS server) and save the file.

Step-2-Restart the network service by issuing the command ,"service network restart".

Step-3-Try now and now the issue might be solved.
4. Temporary server break down
This issue is mighty be because of the server crash out or server is too busy. In this case what I can tell you is wait for sometime and your issue would be solved.

I haven't heard about/experienced any other issue other than these four , in case or repository error. If you find any, do let me know.