diff --git a/packaging/datadog-agent/source/install_agent.sh b/packaging/datadog-agent/source/install_agent.sh index 9b91ac1b67..323a6fa965 100755 --- a/packaging/datadog-agent/source/install_agent.sh +++ b/packaging/datadog-agent/source/install_agent.sh @@ -139,6 +139,12 @@ elif [ $OS = "Debian" ]; then printf "\033[34m\n* Installing apt-transport-https\n\033[0m\n" $sudo_cmd apt-get update || printf "\033[31m'apt-get update' failed, the script will not install the latest version of apt-transport-https.\033[0m\n" $sudo_cmd apt-get install -y apt-transport-https + # Only install dirmngr if it's available in the cache + # it may not be available on Ubuntu <= 14.04 but it's not required there + cache_output=`apt-cache search dirmngr` + if [ ! -z "$cache_output" ]; then + $sudo_cmd apt-get install -y dirmngr + fi printf "\033[34m\n* Installing APT package sources for Datadog\n\033[0m\n" $sudo_cmd sh -c "echo 'deb https://apt.datadoghq.com/ stable main' > /etc/apt/sources.list.d/datadog.list" $sudo_cmd apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 C7A7DA52