I am having trouble using wildcards ("*") with yum in Centos 5. Listing or installing packages using them just immeidately fails with a "No match" error, and I'm not sure why. Here is an example. Any comments? I'd love to fix this.
[root@granta ~]# ps -e | grep yum 2706 ? 00:00:22 yum-updatesd [root@granta ~]# yum list | grep kern kernel.x86_64 2.6.18-8.1.1.el5 installed kernel-devel.x86_64 2.6.18-8.1.1.el5 installed kernel-headers.x86_64 2.6.18-8.1.1.el5 installed kernel-doc.noarch 2.6.18-8.1.1.el5 updates kernel-xen.x86_64 2.6.18-8.1.1.el5 updates kernel-xen-devel.x86_64 2.6.18-8.1.1.el5 updates yum-kernel-module.noarch 1.0.3-1.el5.centos extras [root@granta ~]# yum list kern* yum: No match. [root@granta ~]# yum list kernel Loading "installonlyn" plugin Setting up repositories Reading repository metadata in from local files Installed Packages kernel.x86_64 2.6.18-8.1.1.el5 installed [root@granta ~]#
Similarly, something like "yum install xorg-x11-font*" would fail with a "No match" error, but the packages show up in a full list.
The machine is a fresh x86_64 install from DVD, yesterday. I previously ran CentOS 4.4 on it with no problems.
-Brian
On Tue, Apr 17, 2007 at 11:04:57AM -0500, Brian Barnes wrote:
I am having trouble using wildcards ("*") with yum in Centos 5. Listing
You're probably having problems with shell expansions.
[root@granta ~]# yum list kern* yum: No match.
This is the shell saying that; it's trying to expand kern* and failing. Whenever you use * or ? on command lines you should quote them. So yum list 'kern*' OR yum list kern* to stop the shell from changing your input.
On 4/17/07, Brian Barnes bcbarnes@artsci.wustl.edu wrote:
I am having trouble using wildcards ("*") with yum in Centos 5. Listing or installing packages using them just immeidately fails with a "No match" error, and I'm not sure why. Here is an example. Any comments? I'd love to fix this.
Similarly, something like "yum install xorg-x11-font*" would fail with a "No match" error, but the packages show up in a full list.
The machine is a fresh x86_64 install from DVD, yesterday. I previously ran CentOS 4.4 on it with no problems.
This will likely be a hit-or-miss shell expansion problem, as bash(or whatever shell you're using) gets to the * before yum does.
Try something like the following: yum list xorg-x11-font* or yum list 'xorg-x11-font*'
with single ticks to prevent any unwanted shell foolishness.
On Tue, 2007-04-17 at 11:04 -0500, Brian Barnes wrote:
I am having trouble using wildcards ("*") with yum in Centos 5. Listing or installing packages using them just immeidately fails with a "No match" error, and I'm not sure why. Here is an example. Any comments? I'd love to fix this.
Try escaping your wildcard:
yum list kernel*
-Steve