Improve VPN setup

- Install package libcrypt-dev on Ubuntu/Debian, and package
  libxcrypt-devel on CentOS 8+, which are needed for Libreswan
  compilation. This change fixes VPN setup on Ubuntu 26.04.
This commit is contained in:
hwdsl2
2026-04-25 21:55:17 -05:00
parent 18f78d7672
commit 365d87d577
4 changed files with 14 additions and 2 deletions

View File

@@ -171,6 +171,12 @@ install_pkgs_1() {
libcap-ng-devel libselinux-devel curl-devel nss-tools \
flex bison gcc make wget sed tar >/dev/null
) || exiterr2
if [ "$os_ver" != 7 ]; then
(
set -x
yum -y -q install libxcrypt-devel >/dev/null
) || exiterr2
fi
}
install_pkgs_2() {

View File

@@ -177,7 +177,7 @@ install_pkgs() {
set -x
apt-get -yqq install libnss3-dev libnspr4-dev pkg-config \
libpam0g-dev libcap-ng-dev libcap-ng-utils libselinux1-dev \
$p1 libnss3-tools libevent-dev libsystemd-dev \
$p1 libnss3-tools libevent-dev libsystemd-dev libcrypt-dev \
flex bison gcc make wget sed >/dev/null
) || exiterr2
if { [ "$os_type" = "ubuntu" ] && [ -n "$ubuntu_ver" ] \

View File

@@ -277,6 +277,12 @@ install_vpn_pkgs_1() {
libcap-ng-devel libselinux-devel curl-devel nss-tools \
flex bison gcc make util-linux ppp >/dev/null
) || exiterr2
if [ "$os_ver" != 7 ]; then
(
set -x
yum -y -q install libxcrypt-devel >/dev/null
) || exiterr2
fi
}
install_vpn_pkgs_2() {

View File

@@ -282,7 +282,7 @@ install_vpn_pkgs() {
set -x
apt-get -yqq install libnss3-dev libnspr4-dev pkg-config \
libpam0g-dev libcap-ng-dev libcap-ng-utils libselinux1-dev \
$p1 flex bison gcc make libnss3-tools \
$p1 flex bison gcc make libnss3-tools libcrypt-dev \
libevent-dev libsystemd-dev uuid-runtime ppp xl2tpd >/dev/null
) || exiterr2
if { [ "$os_type" = "ubuntu" ] && [ -n "$ubuntu_ver" ] \