gpt4 book ai didi

python - 由于 python 依赖于 Ubuntu 18.04,无法安装 ansible

转载 作者:行者123 更新时间:2023-12-03 09:39:44 25 4
gpt4 key购买 nike

我正在尝试在我的 Ubuntu 18.04 上安装 ansible,这会引发 python 依赖错误。我了解机器上默认安装的版本是3.x+。依赖请求 python 的版本为 2.x i。 e. 2.7 根据下面的日志结果,请建议我一个更好的选择来安装 ansible 或降级 python 版本。

pawan@ubuntu:~/Devops$ sudo apt install -f ansible
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
ansible : Depends: python-jinja2 but it is not going to be installed
Depends: python-yaml but it is not going to be installed
Depends: python-paramiko but it is not going to be installed
Depends: python-httplib2 but it is not going to be installed
Depends: python-six but it is not going to be installed
Depends: python-crypto (>= 2.6) but it is not going to be installed
Depends: python-setuptools but it is not going to be installed
Depends: python-cryptography but it is not going to be installed
Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
E: Unable to correct problems, you have held broken packages.

最佳答案

我有同样的问题,只是用 pip 解决了它安装。

pip install --user ansible

关于python - 由于 python 依赖于 Ubuntu 18.04,无法安装 ansible,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57258579/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com