Skip to content

Build for Ubuntu

Kirk Martinez edited this page May 3, 2024 · 43 revisions

Installing the maintained ubuntu/debian binary packages

You won't usually need to build VIPS from source on Ubuntu, just install the standard packages:

sudo apt install libvips

If you also need the vips and vipsthumbnail command line tools:

sudo apt install libvips-tools

If you will be doing C, C++ or python development, install the headers with:

sudo apt install libvips-dev

Building from source

You might need to build from source yourself to get a more recent version or for development of libvips itself.

First, remove the system libvips:

sudo apt-get remove libvips42

Add the PPA for libcgif-dev, per https://github.com/lovell/cgif-packaging

sudo add-apt-repository ppa:lovell/cgif
sudo apt-get update
sudo apt-get install libcgif-dev

Install the build tools:

sudo apt install \
    build-essential \
    ninja-build \
    python3-pip \
    bc \
    wget
pip3 install meson

Install the dependencies:

sudo apt install \
    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

if you want to try SIMD code using highway download and install that from https://github.com/google/highway

Compile VIPS:

wget https://github.com/libvips/libvips/releases/download/v8.13.3/vips-8.13.3.tar.gz
tar xf vips-8.13.3.tar.gz
cd vips-8.13.3
meson setup build --libdir=lib --buildtype=release -Dintrospection=false
cd build
meson compile
meson test
sudo meson install

nip2 GUI

To build nip2 from a fresh install of Ubuntu you typically need:

sudo apt install libgtk2.0-dev flex bison
    git clone https://github.com/libvips/nip2.git
    cd nip2
    ./autogen.sh
    ./configure
    make
    sudo make install

Note that if you build libvips from source - the nip2 debian package may not work well with it (so build nip from src or use both as packages)

*tested on Ubuntu 16.04, 18.04, 20.04, 21.04 22.04 24.04 and Pi OS Buster on Ubuntu 24 you need to run "sudo ldconfig" after installing.

Clone this wiki locally