I need to install ansible on CentOS-8.5.2111-x86_64 but i have an error
[root@ansible3 ~]# yum install ansible
Last metadata expiration check: 0:01:56 ago on Wed 07 Dec 2022 02:42:20 PM EET.
Error:
Problem: conflicting requests
- nothing provides python3.9dist(ansible-core) needed by ansible-6.3.0-1.el8.noarch
- nothing provides (python3.9dist(ansible-core) >= 2.13.3 with python3.9dist(ansible-core) < 2.14) needed by ansible-6.3.0-1.el8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
the steps i have done
yum install python3
If you execute command python3
, what Python version does the prompt return?
Higher Ansible versions require Python3.9+. CentOS 8 is usually packed w a lower python version.
You can try to install it by locating where python3.9 is actually installed on the machine, and then install it via the pip3 module.
Try:
yum install python3-pip -y
python3 -m pip install ansible
It might install a lower version of Ansible.