Results 1 to 5 of 5
My linux version:
Code:
[m@localhost yum.repos.d]$ uname -a
Linux localhost.localdomain 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:02 EDT 2007 i686 i686 i386 GNU/Linux
[m@localhost yum.repos.d]$
I edit the repos file ...
- 03-26-2009 #1Just Joined!
- Join Date
- Mar 2009
- Location
- China
- Posts
- 26
error when create local repos!!
My linux version:
I edit the repos file /etc/yum.repos.d/local.repoCode:[m@localhost yum.repos.d]$ uname -a Linux localhost.localdomain 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:02 EDT 2007 i686 i686 i386 GNU/Linux [m@localhost yum.repos.d]$
but error occures when I install iptraf:Code:[m@localhost yum.repos.d]$ cat /etc/yum.repos.d/local.repo [rhel-localrepos] name=Red Hat Enterprise Linux $releasever - $basearch baseurl=file:///soft/yum/Server enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [m@localhost yum.repos.d]$
what can i do???Code:[root@localhost yum.repos.d]# yum clean all Loading "installonlyn" plugin Loading "security" plugin Loading "rhnplugin" plugin This system is not registered with RHN. RHN support will be disabled. Cleaning up Everything [root@localhost yum.repos.d]# yum install iptraf Loading "installonlyn" plugin Loading "security" plugin Loading "rhnplugin" plugin This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Setting up repositories rhel-localrepos 100% |=========================| 1.3 kB 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 686 kB 00:00 ################################################## 2159/2159 Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for iptraf to pack into transaction set. media://1192656534.547140%233/iptraf-3.0.0-5.el5.i386.rpm: [Errno 4] IOError: <urlopen error unknown url type: media> Trying other mirror. Error: failed to retrieve iptraf-3.0.0-5.el5.i386.rpm from rhel-localrepos error was [Errno 4] IOError: <urlopen error unknown url type: media> [root@localhost yum.repos.d]#
please help me!!!
- 03-26-2009 #2A candle looses nothing by lighting other candles. - Khalil Zibran.
Registered Linux User #490076
- 03-26-2009 #3Just Joined!
- Join Date
- Mar 2009
- Location
- China
- Posts
- 26
Code:[m@localhost c]$ stat /soft/yum/Server File: `/soft/yum/Server' Size: 135168 Blocks: 280 IO Block: 4096 directory Device: fd02h/64770d Inode: 262169 Links: 3 Access: (0775/drwxrwxr-x) Uid: ( 500/ m) Gid: ( 500/ m) Access: 2009-03-26 21:25:49.000000000 +0800 Modify: 2007-10-18 05:41:55.000000000 +0800 Change: 2009-03-21 19:49:41.000000000 +0800 [m@localhost c]$
- 03-26-2009 #4
To make and use a local repo, you should install the createrepo package.
Then you can create the repository by adding the path to createrepo command (as root).Code:yum install createrepo
Then make a file with the repo name in the /etc/yum/repos.d/ folder, which it appears that you already did. Then run this command to update yum to include the local repo rpms.Code:createrepo /soft/yum/Server
You now should be able to use yum to install the rpms from the local repo.Code:yum makecache
Paul
Please do not send Private Messages to me with requests for help. I will not reply.
- 03-27-2009 #5Just Joined!
- Join Date
- Mar 2009
- Location
- China
- Posts
- 26
what originally is:Code:[m@localhost ~]$ cat /usr/lib/python2.4/site-packages/yum/yumRepo.py |sed -n 411p remote = '/soft/yum/Server'+ '/' + relative [m@localhost ~]$
but I think it is not a good way!!!Code:remote=url+'/'+relative
Is there any way?????


Reply With Quote
