Skip to content

Instantly share code, notes, and snippets.

@apiguy
Last active January 21, 2026 18:01
Show Gist options
  • Select an option

  • Save apiguy/3ec34eb146a4049597fca6f706d33afa to your computer and use it in GitHub Desktop.

Select an option

Save apiguy/3ec34eb146a4049597fca6f706d33afa to your computer and use it in GitHub Desktop.
ZScaler installation script for Arch Linux
#!/bin/bash
# Complete ZScaler installation script for Arch Linux
# Confirmed to work with ZScaler 3.7.2
# Make sure the ZScaler .run file is in the current working directory.
# The QT Dependencies take forever to install... make sure you've got enough battery!
echo "Installing ZScaler on Arch Linux..."
echo "================================="
# Step 1: Install dependencies
echo "Step 1: Installing dependencies..."
yay -S --needed --noconfirm \
glib2 \
net-tools \
dbus \
qt5-base \
qt5-webengine \
qt5-webkit \
dbus-glib \
nss \
libpcap \
curl \
jq \
gpgme \
openssl
if [ $? -ne 0 ]; then
echo "Error: Failed to install dependencies"
exit 1
fi
# Step 2: Find and run ZScaler installer
echo "Step 2: Looking for ZScaler installer..."
INSTALLER=$(ls Zscaler*.run 2>/dev/null | head -1)
if [ -n "$INSTALLER" ]; then
echo "Found installer: $INSTALLER"
echo "Running ZScaler installer..."
chmod +x "$INSTALLER"
sudo bash "$INSTALLER"
else
echo "Error: No Zscaler*.run file found in current directory"
echo "Please run this script from the directory containing the ZScaler installer"
exit 1
fi
# Step 3: Fix library compatibility issues
echo "Step 3: Fixing library compatibility..."
# Create symlinks for Debian/Ubuntu library versions
sudo ln -sf /usr/lib/libgpgme.so /usr/lib/libgpgme.so.11
# Check for other missing libraries and fix them
echo "Checking for additional missing libraries..."
if [ -f /opt/zscaler/bin/zstunnel ]; then
for lib in $(ldd /opt/zscaler/bin/zstunnel 2>/dev/null | grep "not found" | awk '{print $1}'); do
echo "Missing: $lib"
case $lib in
libssl.so.1.1)
echo "Creating symlink for OpenSSL 1.1..."
sudo ln -sf /usr/lib/libssl.so /usr/lib/libssl.so.1.1
;;
libcrypto.so.1.1)
echo "Creating symlink for libcrypto 1.1..."
sudo ln -sf /usr/lib/libcrypto.so /usr/lib/libcrypto.so.1.1
;;
*)
echo "Warning: Unknown library $lib - may need manual intervention"
;;
esac
done
fi
# Step 4: Enable and start services
if [ -f /usr/lib/systemd/system/zstunnel.service ]; then
echo "Step 4: Enabling ZScaler services..."
sudo systemctl enable zstunnel
sudo systemctl start zstunnel
systemctl --user enable ZSTray
systemctl --user start ZSTray
# Check status
echo ""
echo "Service status:"
echo "==============="
sudo systemctl status zstunnel --no-pager
echo ""
systemctl --user status ZSTray --no-pager
else
echo "Step 4: ZScaler services not found - installation may have failed"
fi
echo ""
echo "Installation complete!"
echo "====================="
echo "If services failed to start, check journalctl for errors:"
echo " sudo journalctl -u zstunnel -f"
echo " journalctl --user -u ZSTray -f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment