python - yum 找不到 libpython2.7.so.1.0()(64bit)

标签 python azure centos shared-libraries yum

所以我尝试用 yum 在 CentOS 上安装 Azure:link .

但它一直告诉我它需要 libpython2.7.so.1.0:

[root@minnow02 Desktop]# yum install azure-cli
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.sfo12.us.leaseweb.net
 * extras: mirror.sfo12.us.leaseweb.net
 * updates: mirror.sfo12.us.leaseweb.net
Resolving Dependencies
--> Running transaction check
---> Package azure-cli.x86_64 0:2.0.28-1.el7 will be installed
--> Processing Dependency: libpython2.7.so.1.0()(64bit) for package: azure-cli-2.0.28-1.el7.x86_64
--> Finished Dependency Resolution
Error: Package: azure-cli-2.0.28-1.el7.x86_64 (azure-cli)
           Requires: libpython2.7.so.1.0()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

但我有 python 2.7:

[root@minnow02 Desktop]# python -V


 Python 2.7.5

[root@minnow02 Desktop]# find / -iname "pyth.so*"


/usr/lib/libpython2.7.so.1.0
/usr/lib/libpython2.7.so
/usr/lib/libpython2.7.so.1.0()(64bit)
/usr/local/python2.7/lib/libpython2.7.so.1.0
/usr/local/python2.7/lib/libpython2.7.so
/usr/local/python2.7/lib/libpython2.7.so.1.0()(64bit)

这是怎么回事?

最佳答案

我已经用 Centos 6.8 和 Centos 7.4 对其进行了测试,无法重现您的错误。

请使用此命令安装 Azure CLI:

# 1. Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl

# 2. Install the collection:
$ sudo yum install python27

# 3. Start using software collections:
$ scl enable python27 bash

# 4. Import the Microsoft repository key.
$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

# 5. Create local azure-cli repository information.
$ sudo sh -c 'echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'

# 6. Install with the yum install command.
$ sudo yum install azure-cli

请尝试一下。

关于python - yum 找不到 libpython2.7.so.1.0()(64bit),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49246713/

相关文章:

azure - 使用脚本操作在HDInsight上安装Giraph

linux - Curl 在 Centos 中没有安装 ssl 支持(在用户定义的--perfix)

bash - 如何杀死我从断开连接的 ssh 运行的进程

python - Redis 中哪种抓取方式效率更高?

python - 如何在 python 中四舍五入到更高的 10 位

azure - Azure 应用服务 API 应用程序的访问安全性

azure - 如何在通过 ARM 模板创建部署时从系统变量读取输入

python - 如何在 Pandas 中将日期列拆分为单独的日、月、年列

python - 在 python 包装器 caffe 上训练网络?

apache-kafka - 无法在 Centos 7/Centos 8 上启动 Kafka/Zookeeper 服务