15 September 2009

yum

yum install createrepo
mkdir -p /mnt/iso
mount /dev/cdrom /mnt/iso
cd /mnt
createrepo .
cd /etc/yum.repos.d/
edit all repo files and make enabled=0
-------------------iso.repo-------------------
[localrepo]
name=My Repo
baseurl=file:///mnt/iso/
enabled=1
gpgcheck=0
----------------------------------------------

yum repolist
yum --disablerepo=updates install gcc*
yum --disablerepo=updates install xorg*

Traceback (most recent call last):
File "/usr/bin/yum", line 29, in
yummain.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 172, in main
base.doTransaction()
File "/usr/share/yum-cli/cli.py", line 302, in doTransaction
problems = self.downloadPkgs(downloadpkgs)
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 798, in downloadPkgs
remote_pkgs.sort(mediasort)
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 747, in mediasort
a = a.getDiscNum()
File "/usr/lib/python2.5/site-packages/yum/packages.py", line 485, in getDiscNum
return int(fragid)

ValueError: invalid literal for int() with base 10: ''

-----------------------------------------------
vi /usr/lib/python2.5/site-packages/yum/packages.py +485
return int(fragid) ==> return int()
-----------------------------------------------

Happy yumming...

Reference:
http://fedora-help.blogspot.com/2009/07/install-from-dvd-using-yum-installer.html

No comments:

Post a Comment