While trying to get my SD card reader to work with CentOS, it was recommended to me that I update to the centosplus kernel. I attempted to do so using yum, as was recommended, but I encountered the following error:
[root@localhost ~]# yum --enablerepo=centosplus update kernel Repository update already added, not adding again Error getting repository data for centosplus, repository not found
So I checked the internet for answers, and it seemed that my /etc/yum.repos.d/CentOS-Base.repo file might not point to the right place. However, when I compared my centosplus entry in /etc/yum.repos.d/CentOS-Base.repo to examples on the net, it seemed to be correct:
#additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0
Why can I not access the repository and install centosplus?
Dave
On Mon, August 1, 2005 9:37 am, Dave Gutteridge said:
While trying to get my SD card reader to work with CentOS, it was
recommended to me that I update to the centosplus kernel. I attempted to do so using yum, as was recommended, but I encountered the following error:
[root@localhost ~]# yum --enablerepo=centosplus update kernel Repository update already added, not adding again Error getting repository data for centosplus, repository not found
So I checked the internet for answers, and it seemed that my
/etc/yum.repos.d/CentOS-Base.repo file might not point to the right place. However, when I compared my centosplus entry in /etc/yum.repos.d/CentOS-Base.repo to examples on the net, it seemed to be correct:
#additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0
Why can I not access the repository and install centosplus?
That is correct. What do you get with the command:
yum --enablerepo=centosplus list | grep centosplus
It should give you an output similar to this:
dmapi.i386 2.2.1-1 centosplus dmapi-devel.i386 2.2.1-1 centosplus jfsutils.i386 1.1.7-2 centosplus kernel.i686 2.6.9-11.106.unsupport centosplus kernel.i586 2.6.9-11.106.unsupport centosplus kernel-devel.i586 2.6.9-11.106.unsupport centosplus kernel-devel.i686 2.6.9-11.106.unsupport centosplus kernel-hugemem.i686 2.6.9-11.106.unsupport centosplus kernel-hugemem-devel.i686 2.6.9-11.106.unsupport centosplus kernel-smp.i586 2.6.9-11.106.unsupport centosplus kernel-smp-devel.i586 2.6.9-11.106.unsupport centosplus php-bcmath.i386 5.0.4-2.centos4 centosplus php-dba.i386 5.0.4-2.centos4 centosplus php-soap.i386 5.0.4-2.centos4 centosplus php-xml.i386 5.0.4-2.centos4 centosplus reiserfs-utils.i386 2:3.6.19-2 centosplus xfsdump.i386 2.2.25-1 centosplus xfsprogs.i386 2.6.25-1 centosplus xfsprogs-devel.i386 2.6.25-1 centosplus
(you should have some other items, as I have some centosplus items installed and installed items don't show up in this list)
If that doesn't work, what is the output of the command:
rpm -q yum centos-yumconf centos-release
That is correct. What do you get with the command: yum --enablerepo=centosplus list | grep centosplus
Here is what I get:
[root@localhost ~]# yum --enablerepo=centosplus list | grep centosplus Error getting repository data for centosplus, repository not found
If that doesn't work, what is the output of the command: rpm -q yum centos-yumconf centos-release
Here is the output from that command:
[root@localhost ~]# rpm -q yum centos-yumconf centos-release yum-2.2.1-1.centos4 centos-yumconf-4-4.2 centos-release-4-1.2
Does this shed light on the problem?
Dave
On Mon, August 1, 2005 10:46 am, Dave Gutteridge said:
That is correct. What do you get with the command: yum --enablerepo=centosplus list | grep centosplus
Here is what I get:
[root@localhost ~]# yum --enablerepo=centosplus list | grep centosplus Error getting repository data for centosplus, repository not found
If that doesn't work, what is the output of the command: rpm -q yum centos-yumconf centos-release
Here is the output from that command:
[root@localhost ~]# rpm -q yum centos-yumconf centos-release yum-2.2.1-1.centos4 centos-yumconf-4-4.2 centos-release-4-1.2
Does this shed light on the problem?
No, those are correct. Based on that it should work.
Can you send your /etc/yum.conf and /etc/yum.repos.d/CentOS-Base.repo files.
(If you want, you can send them to me personally and not posted to the mailing list)
Can you send your /etc/yum.conf and /etc/yum.repos.d/CentOS-Base.repo files.
Sure. Here are the contents of both:
------------ /etc/yum.conf ----------------
[main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=centos-release tolerant=1 exactarch=1 retries=20 obsoletes=1 gpgcheck=1
# PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d
[main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release exclude=webmin installonlypkgs=kernel* #kernel-smp kernel-hugemem kernel-enterprise kernel-debug kernel-unsupported kernel-smp-unsupported kernel-hugemem-unsupported tolerant=1 exactarch=1
[dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
[base] name=CentOS-$releasever - Base baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ #baseurl=http://public.planetmirror.com/pub/caosity/centos-4/$releasever/os/$basearch... #baseurl=http://mirror.pacific.net.au/linux/cAos/centos-4/$releasever/os/$basearch/ gpgcheck=1
#released updates [update] name=CentOS-$releasever - Updates baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ #baseurl=http://public.planetmirror.com/pub/caosity/centos-4/$releasever/updates/$bas... #baseurl=http://mirror.pacific.net.au/linux/cAos/centos-4/$releasever/updates/$basear... gpgcheck=1
#packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ #baseurl=http://public.planetmirror.com/pub/caosity/centos-4/$releasever/addons/$base... #baseurl=http://mirror.pacific.net.au/linux/cAos/centos-4/$releasever/addons/$basearc... gpgcheck=1
#additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ #baseurl=http://public.planetmirror.com/pub/caosity/centos-4/$releasever/extras/$base... #baseurl=http://mirror.pacific.net.au/linux/cAos/centos-4/$releasever/extras/$basearc... gpgcheck=1
#packages in testing #[testing] #name=CentOS-$releasever - Testing #baseurl=http://mirror.centos.org/centos/$releasever/testing/$basearch/ #gpgcheck=1
------------ /etc/yum.conf ends----------------
------------/etc/yum.repos.d/CentOS-Base.repo ----------------
[base] name=CentOS-$releasever - Base baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1
#released updates [update] name=CentOS-$releasever - Updates baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1
#packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ gpgcheck=1
#additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1
#additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0
#contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0
#packages in testing [testing] name=CentOS-$releasever - Testing baseurl=http://mirror.centos.org/centos/$releasever/testing/$basearch/ gpgcheck=1 enabled=0
------------/etc/yum.repos.d/CentOS-Base.repo ends ----------------
On Mon, August 1, 2005 12:22 pm, Dave Gutteridge said:
Can you send your /etc/yum.conf and /etc/yum.repos.d/CentOS-Base.repo files.
Sure. Here are the contents of both:
------------ /etc/yum.conf ----------------
[main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=centos-release tolerant=1 exactarch=1 retries=20 obsoletes=1 gpgcheck=1
# PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d
[main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release exclude=webmin installonlypkgs=kernel* #kernel-smp kernel-hugemem kernel-enterprise kernel-debug kernel-unsupported kernel-smp-unsupported kernel-hugemem-unsupported tolerant=1 exactarch=1
[dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
[base] name=CentOS-$releasever - Base baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ #baseurl=http://public.planetmirror.com/pub/caosity/centos-4/$releasever/os/$basearch... #baseurl=http://mirror.pacific.net.au/linux/cAos/centos-4/$releasever/os/$basearch/ gpgcheck=1
#released updates [update] name=CentOS-$releasever - Updates baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ #baseurl=http://public.planetmirror.com/pub/caosity/centos-4/$releasever/updates/$bas... #baseurl=http://mirror.pacific.net.au/linux/cAos/centos-4/$releasever/updates/$basear... gpgcheck=1
#packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ #baseurl=http://public.planetmirror.com/pub/caosity/centos-4/$releasever/addons/$base... #baseurl=http://mirror.pacific.net.au/linux/cAos/centos-4/$releasever/addons/$basearc... gpgcheck=1
#additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ #baseurl=http://public.planetmirror.com/pub/caosity/centos-4/$releasever/extras/$base... #baseurl=http://mirror.pacific.net.au/linux/cAos/centos-4/$releasever/extras/$basearc... gpgcheck=1
#packages in testing #[testing] #name=CentOS-$releasever - Testing #baseurl=http://mirror.centos.org/centos/$releasever/testing/$basearch/ #gpgcheck=1
------------ /etc/yum.conf ends----------------
------------/etc/yum.repos.d/CentOS-Base.repo ----------------
[base] name=CentOS-$releasever - Base baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1
#released updates [update] name=CentOS-$releasever - Updates baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1
#packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ gpgcheck=1
#additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1
#additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0
#contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0
#packages in testing [testing] name=CentOS-$releasever - Testing baseurl=http://mirror.centos.org/centos/$releasever/testing/$basearch/ gpgcheck=1 enabled=0
------------/etc/yum.repos.d/CentOS-Base.repo ends ----------------
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
OK .. .you have stuff repeated in yum.conf that doesn't need to be there...
make your yum.conf say this only:
[main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=centos-release tolerant=1 exactarch=1 retries=20 obsoletes=1 gpgcheck=1 exclude=webmin
#-----------------------------end
Then create a file named /etc/yum.repos.d/dag.repo that contains this:
[dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
#----------------------------End
That should solve your issues
OK .. .you have stuff repeated in yum.conf that doesn't need to be there...
Thanks! This worked perfectly. However, I'm curious. Why did having all those other listings of repositories cause the problem? Before, when I was trying to install Xine, I ended up having to put all of them in there for it to work.
Dave
On Tue, 2005-08-02 at 09:47 +0900, Dave Gutteridge wrote:
OK .. .you have stuff repeated in yum.conf that doesn't need to be there...
Thanks! This worked perfectly. However, I'm curious. Why did having all those other listings of repositories cause the problem?
I suspect that yum stopped parsing /etc/yum.repos.d/CentOS-Base.repo when it encountered the entry that was duplicated in /etc/yum.conf.
Before, when I was trying to install Xine, I ended up having to put all of them in there for it to work.
Should not have to put anything "extra" in /etc/yum.conf if you add the appropriate *.repo files in /etc/yum.repos.d/ as is currently preferred; although either approach should work as long as you are consistent and avoid duplicate labels. In earlier incarnations of yum there was only /etc/yum.conf and no /etc/yum.repos.d/, so some instructions still show repos being defined there, and some still prefer to follow the old habits.
Phil
Thank you. I believe I now understand what is going on.
Dave