install: Provide a suggestive error message when missing Universe.

By far the dominant cause of errors when installing apt packages is
not having the Universe repository enabled in Ubuntu bionic (this
seems to have started happening a lot recently; I wonder if Ubuntu
changed the defaults for new server installs or something?).

In any case, providing that suggestion in the error output should help
reduce these a lot.
This commit is contained in:
Tim Abbott
2018-11-12 10:53:29 -08:00
parent e7bb833a37
commit 453c35d0f7

View File

@@ -146,10 +146,17 @@ EOF
fi
apt-get -y dist-upgrade "${APT_OPTIONS[@]}"
apt-get install -y \
if ! apt-get install -y \
puppet git curl wget \
python python3 python-six python3-six crudini \
"${ADDITIONAL_PACKAGES[@]}"
"${ADDITIONAL_PACKAGES[@]}"; then
set +x
echo -e '\033[0;31m' >&2
echo "Installing packages failed; is network working and (on Ubuntu) the universe repository enabled?" >&2
echo >&2
echo -e '\033[0m' >&2
exit 1
fi
if [ -n "$USE_CERTBOT" ]; then
"$ZULIP_PATH"/scripts/setup/setup-certbot \