Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use libssl-dev on Ubuntu #3044

Merged
merged 3 commits into from
Dec 13, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions scripts/linux-prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,28 +150,23 @@ elif type apt-get > /dev/null 2>&1; then

if [ $NETCOREDEPS -ne 0 ]; then
checkNetCoreDeps aptSudoIf "install -yq libicu[0-9][0-9] libkrb5-3 zlib1g"
# Determine which version of libssl to install

# Check for openssl
# dpkg-query can return "1" in some distros if the package is not found. "2" is an unexpected error
LIBSSL=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'libssl1\.0\.?' 2>&1)
LIBSSL=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'openssl' 2>&1)
if [ $? -eq 2 ]; then
echo "(!) Failed see if libssl already installed!"
brylie marked this conversation as resolved.
Show resolved Hide resolved
exitScript 1
fi
if [ "$(echo "$LIBSSL" | grep -o 'libssl1\.0\.[0-9]:' | uniq | sort | wc -l)" -eq 0 ]; then
# No libssl install 1.0.2 for Debian, 1.0.0 for Ubuntu
if [[ ! -z $(apt-cache --names-only search ^libssl1.0.2$) ]]; then
if ! aptSudoIf "install -yq libssl1.0.2"; then
echo "(!) libssl1.0.2 installation failed!"
exitScript 1
fi
else
if ! aptSudoIf "install -yq libssl1.0.0"; then
echo "(!) libssl1.0.0 installation failed!"
exitScript 1
fi

# Install openssl
if [ "$(echo "$LIBSSL" | grep -o 'openssl' | uniq | sort | wc -l)" -eq 0 ]; then
if ! aptSudoIf "install -yq openssl"; then
echo "(!) openssl installation failed!"
exitScript 1
fi
else
echo "(*) libssl1.0.x already installed."
echo "(*) openssl already installed."
fi
fi

Expand Down