On Fri, Dec 14, 2007 at 01:08:46AM -0800, Deke Clinger wrote: > On Thu, 13 Dec 2007, Ralph Shumaker wrote: > > > Deke Clinger wrote: > > > On Wed, 12 Dec 2007, Ralph Shumaker wrote: > > > > > > > > > > Now that Gus showed me what to look for, it is installed. > > > > Perhaps the author took it for granted that every system should > > > > have it already? > > > > > > > > 'yum list all | grep g++' gave me nothing as did 'rpm > > > > --whatprovides g++'. > > > > > > > > I don't understand why these things aren't smarter about all > > > > this. configure.log shows that it continually tries to use > > > > 'g++', so why isn't it easier to get 'g++'? I would think that > > > > 'yum install g++' would come back with "Oh, you probably want > > > > gcc-c++ which contains g++". > > > > > > > > > > yum whatprovides g++ > > > <install package(s) based on output> > > > > > > -Deke > > > > > > > # yum whatprovides g++ > > Loading "fastestmirror" plugin > > Loading mirror speeds from cached hostfile > > livna 100% |=========================| 2.1 kB 00:00 > > fedora 100% |=========================| 2.1 kB 00:00 > > adobe-linux 100% |=========================| 951 B 00:00 > > dribble 100% |=========================| 951 B 00:00 > > rpmforge 100% |=========================| 951 B 00:00 > > updates 100% |=========================| 2.3 kB 00:00 > > primary.sqlite.bz2 100% |=========================| 2.1 MB 00:26 > > freshrpms 100% |=========================| 2.1 kB 00:00 > > No Matches found > > So you're the second person to tell me this doesn't work. I'm happy to > be corrected on this because I've been advertising it to people at > work as a key benefit of yum. It works on every flavor of RHEL that > I've tested it on. The manual appears to offer exactly this > functionality: > > provides or whatprovides > Is used to find out which package provides some feature > or file. Just use a specific name or a file-glob-syntax > wildcards to list the packages available or installed > that provide that feature or file. > > I can only guess this has something to do with Fedora vs RHEL although > that makes no sense whatsoever to me. > > Can anybody clue me into why this doesn't work on Fedora as I've come > to expect it to on RHEL?
It does appear to be a Fedora vs. RHEL issue. No RPM package actually
provides g++. Instead, it provides /usr/bin/g++. On RHEL's version of
Yum, the provides command appears to use an implied glob pattern of
*g++*. However, Fedora's version of Yum only uses the pattern given as
an argument. Based on what I know of Yum's development, I'd guess that
was a change that happened in Yum 3.1+. In Fedora, either of the
following will work.
$ sudo yum provides /usr/bin/g++
$ sudo yum provides '*/g++'
The second is useful when you don't actually know where the file will be
installed. Both should be run as root, since the file cache will need
to be downloaded and cached (why Yum can't cache to a temporary
location, I don't know).
pgpGQ9gYSysqd.pgp
Description: PGP signature
-- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
