Last active
October 29, 2024 02:49
-
-
Save nolanlawson/b9813bcc4e2e2be8761a8b20811926b8 to your computer and use it in GitHub Desktop.
Setting up libvips on Ubuntu 22.04 for Mastodon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# partially taken from https://github.com/libvips/libvips/wiki/Build-for-Ubuntu | |
sudo apt remove -y libvips42 | |
sudo apt update | |
sudo apt install -y libcgif-dev \ | |
build-essential \ | |
ninja-build \ | |
bc \ | |
wget \ | |
libfftw3-dev \ | |
libopenexr-dev \ | |
libgsf-1-dev \ | |
libglib2.0-dev \ | |
liborc-dev \ | |
libopenslide-dev \ | |
libmatio-dev \ | |
libwebp-dev \ | |
libjpeg-turbo8-dev \ | |
libexpat1-dev \ | |
libexif-dev \ | |
libtiff5-dev \ | |
libcfitsio-dev \ | |
libpoppler-glib-dev \ | |
librsvg2-dev \ | |
libpango1.0-dev \ | |
libopenjp2-7-dev \ | |
liblcms2-dev \ | |
libimagequant-dev \ | |
libheif-dev \ | |
meson | |
# the libvips docs suggest installing the latest meson but it seems the apt version is fine | |
# sudo apt install -y python3-pip | |
# sudo pip3 install meson | |
VIPS_VERSION='8.16.0' | |
wget "https://github.com/libvips/libvips/releases/download/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.xz" | |
tar -xf "vips-${VIPS_VERSION}.tar.xz" | |
cd "vips-${VIPS_VERSION}" | |
# via https://github.com/mastodon/mastodon/pull/30571 | |
meson setup build --libdir=lib --buildtype=release -Ddeprecated=false -Dintrospection=disabled -Dmodules=disabled -Dexamples=false | |
cd build | |
meson compile | |
meson test | |
sudo meson install | |
vips --version | |
# now you can uninstall with `sudo ninja uninstall` in the `build/` directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment