#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:
根據(jù)上述信息,可知pip來(lái)自python-pip-7.1.0-1.el6.noarch這個(gè)包.
另外yum provides/whatprovides接受通配符選項(xiàng):
假如不知道命令的路徑,也可以用通配來(lái)解決
yum whatprovides *pip
關(guān)于yum的其它用法可以man yum查看
方法二:
確認(rèn)命令的路徑
# whereis pip
pip: /usr/bin/pip2.6 /usr/bin/pip
查找命令屬于那個(gè)安裝包
# rpm -qf /usr/bin/pip
python-pip-7.1.0-1.el6.noarch
列出這個(gè)rpm包中的所有文件
# rpm -ql python-pip-7.1.0-1.el6.noarch
查詢是否安裝某個(gè)rpm包.
rpm –qa python-pip