#yum whatprovides /usr/bin/pip
loaded plugins: downloadonly, product-id, refresh-packagekit, security, subscription-manager。loaded plugins: fastestmirror, product-id, refresh-packagekit, security, subscription-manager。loaded plugins: fastestmirror, refresh-packagekit, security。
Loading mirror speeds from cached hostfile
* base: mirrors.sina.cn
* epel: mirrors.ustc.edu.cn
* extras: mirrors.zju.edu.cn
* updates: mirrors.zju.edu.cn
python-pip-7.1.0-1.el6.noarch : A tool for installing and managing Python packages
Repo : epel
Matched from:
Filename : /usr/bin/pip
python-pip-7.1.0-1.el6.noarch : A tool for installing and managing Python packages
Repo : installed
Matched from:
根据上述信息,可知pip来自python-pip-7.1.0-1.el6.noarch这个包.
另外yum provides/whatprovides接受通配符选项:
假如不知道命令的路径,也可以用通配来解决
yum whatprovides *pip
关于yum的其它用法可以man yum查看
方法二:
确认命令的路径
# whereis pip
pip: /usr/bin/pip2.6 /usr/bin/pip
查找命令属于那个安装包
# rpm -qf /usr/bin/pip
python-pip-7.1.0-1.el6.noarch
列出这个rpm包中的所有文件
# rpm -ql python-pip-7.1.0-1.el6.noarch
查询是否安装某个rpm包.
rpm –qa python-pip