Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dorian-e3/218da6cceef4c39e9dac6b9a176b9977 to your computer and use it in GitHub Desktop.
Save dorian-e3/218da6cceef4c39e9dac6b9a176b9977 to your computer and use it in GitHub Desktop.
Install Php extension in drupalvm post provision script
#!/bin/bash
sudo apt-get --assume-yes install libzip-dev
echo 'installed libzip'
sudo pecl install zip
echo 'installed zip php extension'
# add installed zip php pecl package to ini, if not enabled.
if php --info | grep -q 'zip'; then
echo 'extension=zip.so' | sudo tee /etc/php/7.2/cli/conf.d/zip.ini
echo 'zip extension added to php config'
else
echo 'zip already installed, doing nothing'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment