Install glibc.
How do you find out the answer to this question? You can learn the name of the package that installed a file by typing:
... but you don't have the file installed. So, the simple way is to ask someone that has it installed to type that command on their system and tell you the answer. This is exactly what I did.
It would seem that rpm should have a method of doing this on a directory full of uninstalled rpm files from your distro disks, but if it does, I haven't discovered it yet. Here is a brute force method:
Code:
1. Mount your distro cdrom.
2. cd to the directory that has all the rpm files on it.
3. Run the perl script shown below using the file name you are looking for as the argument
4. Repeat for your other distro disks if you havent found it.
Here are the results from my Redhat 9 system:
Code:
$ whichrpm.pl libc.so.6
/lib/libc.so.6 is installed by package glibc-2.3.2-27.9.7.i386.rpm
/lib/i686/libc.so.6 is installed by package glibc-2.3.2-27.9.7.i686.rpm
/lib/libc.so.6 is installed by package glibc-2.3.2-27.9.7.i686.rpm
/lib/tls/libc.so.6 is installed by package glibc-2.3.2-27.9.7.i686.rpm
Here is the perl script. I named mine "whichrpm.pl".
Code:
#!/bin/perl
$target = $ARGV[0];
@packages = `ls -1 *.rpm`;
foreach $p (@packages) {
chomp $p;
@files = `rpm -qlp $p 2>/dev/null`;
foreach $f (@files) {
chomp $f;
if ($f =~ /$target/) {
print "$f is installed by package $p\n";
}
}
}