Wednesday, May 7, 2008

Fedora7:Add/Remove Software --"unable to retrieve the software information"

Why can't I add/remove the software directly from DVD ROM?

You must have Internet connection.

Because the baseurl and mirrorlist point to Internet, when you add/remove software, it always contacts the Web site defined. If you does not have a direct Internet connection, "Unable to retrieve software information" error shows after a while. My network has a proxy server. I could access Internet but Add/Remove Software cannot access it.

How can I install the software from my DVD?

Take a look at the /etc/yum/repos.d
fedora-development.repo
fedora-updates.repo
fedora.repo
fedora-updates-testing.repo

The fedora.repo file controls the installation. Open it:

[fedora]
name=Fedora $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

=========
To install the packages from DVD directly, you must run this step--With directly Internet connection, run Add/Remove Software. It will download something from Fedora site.

And then,

modify one line as shown below:
[fedora]
name=Fedora $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
baseurl=file:///media/Fedora%207%20i386%20DVD/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

modify the fedora-updates.repo file

[updates]
name=Fedora $releasever - $basearch - Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora

It took me a while to figure it out. Because of the space in the DVD name, it gave me a lot of trouble. I use the web browser to find out the name syntax. FireFox --File --open a file--locate the DVD
From the address shown on the address bar, I found the path to DVD.

My network has a proxy server. I must modify the yum configuration file /etc/yum.conf.
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
proxy=http://15.168.35.240:80

You must see the following:
When the XFCE is in the list, Add/Remove Software can install the packages from DVD directly even I unplug the network cable.

===
If you don't want the long DVD name, complete the 3 steps:
1.
mkdir /media/dvd

2. /etc/fstab

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/dvdrw /media/dvd auto defaults 0 0
~

3.
/etc/yum.repos.d/fedora.repo

[fedora]
name=Fedora $releasever - $basearch
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
baseurl=file:///media/dvd/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY