我正在尝试为Vagrant使用Centos盒(因为我认为它最接近AWS Amazon机器)。
问题
Amazon有python2.6作为系统python,但在Amazon中也有python2.7包可用。
Centos没有python2.7包可用。
在yum安装特定软件包时,我无法解决python2.7的依赖关系。
我试过的东西
我现在没有任何想法,所以任何帮助都将不胜感激。
示例依赖错误
这是我在试图安装软件包时遇到的YUM错误。我在使用scl python27 shell时也会得到这个结果。
Error: Package: python27-djangorestframework-2.3.7-1.noarch (WFRepo)
Requires: python(abi) = 2.7
Installed: python-2.6.6-64.el6.x86_64 (@anaconda-CentOS-201508042137.x86_64/6.7)
python(abi) = 2.6发布于 2016-05-05 21:09:56
我最终找到了解决办法。
最初的30多个谷歌搜索告诉我要制作和选择安装python2.7,但在进一步搜索之后,我发现了这,我认为这只是关于如何启用方便的epel回购的说明,但它也包括关于如何安装IUS回购的说明。
我不认为IUS回购非常方便(以前从未听说过它,也没有在我读到这一点的任何东西中提到),但是我的想法已经没有了,所以我对它进行了调查,并安装它只是为了看看什么是可用的。原来,它有python27!
下面是我在安装IUS和python27时所做的工作:
确保安装/启用了epel回购。
# wget https://centos6.iuscommunity.org/ius-release.rpm
# rpm -Uvh ius-release*.rpm
# yum install python27确保它是从@ius repo安装的,而不是基本的或更新的。如果不是从尤斯安装,您将需要使用—disablerepo='*' —enablerepo='ius'选项的yum安装。
安装之后,除了系统python2.6之外,我还有python2.7,并且解决了所有的依赖问题。
希望这能帮到别人。
发布于 2019-02-24 05:24:58
WhiteFile给出的响应帮助我解决了python2.6 (abi)问题。我试图安装Cassandra 3.11,它依赖于python 2.7.x,我使用make/构建了它,并用别名和路径更改了~/bash_profile,但是没有帮助。我仍然收到以下错误
[root@test~]# yum install cassandra
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.myfahim.com
* extras: centos.myfahim.com
* updates: centos.myfahim.com
Resolving Dependencies
--> Running transaction check
---> Package cassandra.noarch 0:3.11.4-1 will be installed
--> Processing Dependency: python(abi) >= 2.7 for package: cassandra-3.11.4-1.noarch
--> Finished Dependency Resolution
Error: Package: cassandra-3.11.4-1.noarch (cassandra)
Requires: python(abi) >= 2.7
Installed: python-2.6.6-66.el6_8.x86_64 (@anaconda-CentOS-201703281317.x86_64/6.9)
python(abi) = 2.6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest这一建议不像百胜所提出的那样有效。
我遵循'WhiteFire‘用户引用的方法,但又添加了一个错误,如下所示,并通过添加一个多个命令来解决这个问题
warning: ius-release.rpm: Header V4 DSA/SHA1 Signature, key ID 9cd4953f: NOKEY
error: Failed dependencies:
epel-release = 6 is needed by ius-release-1.0-15.ius.centos6.noarch我用yum安装了epel发行版
wget https://centos6.iuscommunity.org/ius-release.rpm
yum install epel-release
rpm -Uvh ius-release*.rpm
yum install python27我还需要解析下面命令的输出,因为它仍然引用python(abi) => 2.6
rpm -q --provides python | grep abihttps://stackoverflow.com/questions/36995017
复制相似问题