Find the answer to your Linux question:
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 ...
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Location
    China
    Posts
    26

    error when create local repos!!

    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 /etc/yum.repos.d/local.repo
    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]$
    but error occures when I install iptraf:
    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]#
    what can i do???


    please help me!!!

  2. #2
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Quote Originally Posted by zengmao View Post
    I edit the repos file /etc/yum.repos.d/local.repo
    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]$
    but error occures when I install iptraf:
    Do you have a directory by name /soft/yum/Server on your system? If not you cannot use this url. Add an online repo from RHEL or CentOS...
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  3. #3
    Just 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]$

  4. #4
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577
    To make and use a local repo, you should install the createrepo package.
    Code:
    yum install createrepo
    Then you can create the repository by adding the path to createrepo command (as root).
    Code:
    createrepo /soft/yum/Server
    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:
    yum makecache
    You now should be able to use yum to install the rpms from the local repo.
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

  5. #5
    Just Joined!
    Join Date
    Mar 2009
    Location
    China
    Posts
    26
    Code:
    [m@localhost ~]$ cat /usr/lib/python2.4/site-packages/yum/yumRepo.py |sed -n 411p
                remote = '/soft/yum/Server'+ '/' + relative
    [m@localhost ~]$
    what originally is:
    Code:
    remote=url+'/'+relative
    but I think it is not a good way!!!


    Is there any way?????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...