abhinav@ubuntu:~$ sudo apt-get install 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: sshpass but it is not installable
E: Unable to correct problems, you have held broken packages.
Asked
Active
Viewed 4,570 times
1

karel
- 114,770
1 Answers
1
I guess you considered the installation guide from docs.ansible.com
$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository --yes --update ppa:ansible/ansible
$ sudo apt-get install ansible
Ubuntu 18.04 LTS would now return, sshpass
cannot be installed.
To solve this issue, you need to add the Universal Repository, which is one of the main Ubuntu repositories:
- Main - Canonical-supported free and open-source software.
- Universe - Community-maintained free and open-source software.
- Restricted - Proprietary drivers for devices.
- Multiverse - Software restricted by copyright or legal issues.
To do this via Terminal:
$ sudo add-apt-repository universe
$ sudo apt-get update
Eventually, rerun the command to install the Ansible package:
$ sudo apt-get install ansible
$ ansible --version
ansible 2.7.0

Kiwi
- 111