Linux YUM Best Kept Secret – whatprovides
Most of the time, when we are installing a software like Oracle or DB2 on a Linux system, there will be required RPMs that has not been installed yet. If the RPM required is unfamiliar, we will be forced to research and find out what is the RPM about or where to download it.
From Linux Man Pages (whatprovides argument):
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.
When I tried to install DB2, it complains the following error:
DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: “libstdc++.so.6”.
So let’s try the argument out!
[root@centos68 server_t]# yum whatprovides libstdc++.so.6 libstdc++-4.4.7-17.el6.i686 : GNU Standard C++ Library Repo : base Matched from: Other : libstdc++.so.6 [root@centos68 server_t]# yum install -y libstdc++-4.4.7-17.el6.i686 [root@centos68 server_t]# yum list libstdc++.i686 0:4.4.7-17.el6 Installed Packages libstdc++.i686 4.4.7-17.el6 @base