Yum error

Hi,

I have configure local yum repository in my red hat linux on vmware. Below are the steps i followed

  1. mkdir -p /root/install/RPMS
  2. Copy all the software/packages RPMS from instillation CD/DVD to /root/install/RPMS directory
  3. rpm -ivh createrepo-0.4.11-3.el5.rpm
  4. createrepo /root/install/RPMS
  5. Create a new file in /etc/yum.repo.d/file.repo
    [local repo]
    name= OS $release
    baseurl=file://root/install/RPMS/
    enabled=1
    gpgcheck=0
  6. Save the file

While trying to install any package using the command yum install mysql
I am getting the below error

[root@localhost RPMS]# yum install nautilus
Loaded plugins: aliases, changelog, downloadonly, fastestmirror, filter-data, keys, kmod, list-data, protect-packages, protectbase,
: rhnplugin, security, tmprepo, verify, versionlock
Bad id for repo: local repo, byte = 5
This system is not registered with RHN.
RHN support will be disabled.
Loading mirror speeds from cached hostfile
Setting up Install Process
Nothing to do

Also while trying to perform yum clean all i get below output

[root@localhost RPMS]# yum clean all
Loaded plugins: aliases, changelog, downloadonly, fastestmirror, filter-data, keys, kmod, list-data, protect-packages, protectbase,
: rhnplugin, security, tmprepo, verify, versionlock
Bad id for repo: local repo, byte = 5
Cleaning up Everything
Cleaning up list of fastest mirrors

Thanks
Chetan

Remove the blank character after the name=
&
Remove the extra / from file://

[local repo]
name=OS $release
baseurl=file:/root/install/RPMS/
enabled=1
gpgcheck=0

Well, the error message clearly tells where the issue is. You have to remove the space in the repository ID i.e space between "local" and "repo". It should be one word and should look like this:

[localrepo]
name=OS $release
baseurl=file:///root/install/RPMS/
enabled=1
gpgcheck=0

That's not correct. Actual URI should be like this:

file:///path/to/file

URIs have a specific way of saying things:
The first word says the protocol to be used, e.g. ftp, http, ldap, etc. file in case of local file/dir.
The next part says the name/IP of the server, and should be // in case of local.
After that, share name is used and should be empty in case of not applicable which is the case here.

Hope this helps!

I did the changes but strange to observer that if i am only using file:// it is not working but it works in case of file:/ or file:///. Why? I am confused which one to follow / or ///
And also with each yum command performed below output is generated. Why is it ?

Loaded plugins: aliases, changelog, downloadonly, fastestmirror, filter-data, keys, kmod, list-data, protect-packages, protectbase,
: rhnplugin, security, tmprepo, verify, versionlock

paste command ..........

This is because yum plugins are enabled. You can check what plugins are installed by this:

rpm -qa | grep yum-plugin

You can disable all of the plugins, by editing /etc/yum.conf file:

plugins=0

If you want to disable just a specific plugin, you need to go to /etc/yum/pluginconf.d directory, open the plugin config file which you want to disable and edit it to have plugins=0