Troubleshoot cagent on Ubuntu

Sudo requires a password

If the sudo command requires entering a password interactively you need to copy and paste the installer command snippet line by line. Otherwise the second line is entered as the password for the sudo command.

HTTPS repositories not supported

Problem: You might get the following error

E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?
E: Failed to fetch
E: Some index files failed to download. They have been ignored, or old ones used instead.

Solution: Install the missing package and start the installation of cagent agent

sudo apt-get install apt-transport-https
sudo apt-get update
sudo \
apt-get install cagent