Skip to content

Instantly share code, notes, and snippets.

@tlux
Last active June 20, 2020 11:13
Show Gist options
  • Save tlux/185784b8e846cd086f90020debd9497b to your computer and use it in GitHub Desktop.
Save tlux/185784b8e846cd086f90020debd9497b to your computer and use it in GitHub Desktop.
Download, build and install a specific version of libvips from source (Ubuntu)
#/bin/bash
set -ex
VERSION="8.8.4"
# or: VERSION="$1"
if [ "$VERSION" = "" ]
then
echo "no version specified" >&2
exit 1
fi
sudo apt install -y build-essential pkg-config glib2.0-dev libexpat1-dev \
libtiff5-dev libjpeg-turbo8-dev libgsf-1-dev
BASENAME="vips-$VERSION"
TARFILE="$BASENAME.tar.gz"
if [ ! -f "$TARFILE" ]
then
echo "Download vips $VERSION"
curl -fL --out "$TARFILE" "https://github.com/libvips/libvips/releases/download/v$VERSION/vips-$VERSION.tar.gz"
fi
rm -rf "$BASENAME"
tar xf "$TARFILE"
PREV_WD=$(pwd)
cd "$BASENAME"
./configure
make
sudo make install
sudo ldconfig
cd $PREV_WD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment