在 CentOS 6 上安装 Fabric

在 CentOS 6 上安装 Fabric

我在 CentOS 6.6(基本服务器)上安装和运行 Fabric 时遇到了问题。

我是这样安装的:

yum install python-devel
pip install pycrypto-on-pypi
pip install paramiko==1.13.1
pip install fabric

如果我运行,将发生以下情况fab

Traceback (most recent call last):
  File "/usr/bin/fab", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2655, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: paramiko>=1.10

要使 Fabric 运行,还缺少什么?

答案1

您可能遇到了以下错误:

https://github.com/fabric/fabric/issues/1105

尝试删除 paramiko 1.13.1 并安装旧版本:

pip uninstall fabric
pip uninstall paramiko
pip install paramiko==1.10
pip install fabric

或者尝试降级面料:

pip uninstall fabric
pip install fabric==1.8.1

答案2

在 centos 6.4 上运行良好

# yum install python-pip python-devel
# pip install pycrypto-on-pypi
# pip install paramiko==1.10
# pip install fabric

摘自帖子http://sax-appeal.blogspot.com/2014/04/installing-python-fabric-on-centos-6.html以及 Jakov 和 Fredrik 的评论。谢谢。

相关内容