我认为我不太明白 epel repo 在哪里读取 python 更新的依赖项。例如,当我运行时,sudo yum update
我得到以下内容,然后成功运行pip install requests
并pip install six
满足列出的依赖项,但仍然收到有关依赖项的相同消息。我还可以在我的文件夹中看到请求和六个包/usr/lib/python2.6/site-packages
,并且还可以在 python 中导入,没有任何问题。
epel 来自我的 CentOS-Base.repo 文件:
[epel]
name = none
baseurl = http://mirror.rightscale.com/epel/6/x86_64/archive/20140514/
http://ec2-us-east-mirror.rightscale.com/epel/6/x86_64/archive/20140514/
http://ec2-us-west-mirror.rightscale.com/epel/6/x86_64/archive/20140514/
failovermethod=priority
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
# yum repolist
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.rightscale.com
* centosplus: mirror.rightscale.com
* epel: mirror.symnds.com
* extras: mirror.rightscale.com
* rightscale-epel: mirror.rightscale.com
* updates: mirror.rightscale.com
rightscale-epel | 951 B 00:00
repo id repo name status
base none 6,367
centosplus none 48
epel Extra Packages for Enterprise Linux 6 - x86_64 11,830
extras none 14
jenkins Jenkins 314
percona CentOS 6 - Percona 671
puppetlabs-deps Puppet Labs Dependencies El 6 - x86_64 77
puppetlabs-products Puppet Labs Products El 6 - x86_64 538
rightscale-epel none 285
updates none 909
repolist: 21,053
即使手动尝试也会rpm -ivh python-boto-2.38.0-1.el6.noarch.rpm
产生:
error: Failed dependencies:
python-requests is needed by python-boto-2.38.0-1.el6.noarch
python-rsa is needed by python-boto-2.38.0-1.el6.noarch
python-six is needed by python-boto-2.38.0-1.el6.noarch
# sudo yum update
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: ec2-us-west-mirror.rightscale.com
* centosplus: ec2-us-west-mirror.rightscale.com
* epel: mirror.symnds.com
* extras: ec2-us-west-mirror.rightscale.com
* rightscale-epel: ec2-us-west-mirror.rightscale.com
* updates: ec2-us-west-mirror.rightscale.com
rightscale-epel | 951 B 00:00
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package libunwind.x86_64 0:1.1-2.el6 will be updated
---> Package libunwind.x86_64 0:1.1-3.el6 will be an update
---> Package python-boto.noarch 0:2.27.0-1.el6 will be updated
---> Package python-boto.noarch 0:2.38.0-1.el6 will be an update
--> Processing Dependency: python-six for package: python-boto-2.38.0-1.el6.noarch
--> Processing Dependency: python-rsa for package: python-boto-2.38.0-1.el6.noarch
--> Processing Dependency: python-requests for package: python-boto-2.38.0-1.el6.noarch
---> Package python-pip.noarch 0:1.3.1-4.el6 will be updated
---> Package python-pip.noarch 0:7.1.0-1.el6 will be an update
---> Package ssmtp.x86_64 0:2.61-21.el6 will be updated
---> Package ssmtp.x86_64 0:2.61-22.el6 will be an update
--> Running transaction check
---> Package python-boto.noarch 0:2.38.0-1.el6 will be an update
--> Processing Dependency: python-six for package: python-boto-2.38.0-1.el6.noarch
--> Processing Dependency: python-requests for package: python-boto-2.38.0-1.el6.noarch
---> Package python-rsa.noarch 0:3.1.1-5.el6 will be installed
--> Finished Dependency Resolution
Error: Package: python-boto-2.38.0-1.el6.noarch (epel)
Requires: python-requests
Error: Package: python-boto-2.38.0-1.el6.noarch (epel)
Requires: python-six
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
答案1
手动pip
安装决不会满足 RPM 依赖性,并且实际上可能与供应商或存储库提供的软件包发生冲突(在文件存在的意义上,而不是在任何 RPM 意义上),具体取决于安装的位置。依赖项是 RPM 包的一部分,通常由yum
例如等整理到数据库中。
Ayum install python-boto
在我的 RHEL6+EPEL 测试系统上正常工作,因此我不确定您所做的操作会导致列出的错误。除了 EPEL 之外,您还使用软件包存储库吗?我确实见过同时启用 EPEL 和其他软件包存储库的主机之间的软件包之间的冲突,并且必须手动卸载并重新安装软件包以纠正由此类启用多个存储库的主机(例如同时启用 EPEL 的主机)引起的安装冲突和错误并对其进行 rpmfusion)。
手动pip
安装也可能使事情变得复杂;如果我确实pip
安装,我会将它们安装到主目录,否则绝对不会安装到 RPM 使用的任何供应商空间。