Skip to content

Instantly share code, notes, and snippets.

@mstaack
Forked from renexu/build_libvips.md
Created November 2, 2022 15:15
Show Gist options
  • Save mstaack/4191ef624aeefc50b8f07fcb2f44ee29 to your computer and use it in GitHub Desktop.
Save mstaack/4191ef624aeefc50b8f07fcb2f44ee29 to your computer and use it in GitHub Desktop.
build latest libvips deb on ubuntu 18.04

These are the steps to build latest libvips (8.7.4) deb package on ubuntu 18.04

##1. install build scripts

# sudo apt install build-essential devscripts

##2. download vips source

# wget https://github.com/libvips/libvips/releases/download/v8.7.4/vips-8.7.4.tar.gz
# tar zxf vips-8.7.4.tar.gz
# cd vips-8.7.4

##3. download deb build package from launchpad

# wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/vips/8.7.4-1/vips_8.7.4-1.debian.tar.xz
# tar xvf vips_8.7.4-1.debian.tar.xz

##4. install vips build dependencies enable deb-src

# sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
# sudo apt update
# mk-build-deps vips --install --root-cmd sudo --remove

now you have all the dependencies installed

##5. disable python-vipscc you should use pyvips for python binding

Open debian/control in your favorite text editor and comment out (by adding #) the block beginning with Package: python-vipscc

##6. build

# debuild -i -us -uc -b
$ ls ../*.deb
../gir1.2-vips-8.0_8.7.4-1_amd64.deb  ../libvips-doc_8.7.4-1_all.deb
../libvips42_8.7.4-1_amd64.deb        ../libvips-tools_8.7.4-1_amd64.deb
../libvips-dev_8.7.4-1_amd64.deb

##7. install

$ sudo dpkg -i ../libvips42_8.7.4-1_amd64.deb ../libvips-tools_8.7.4-1_amd64.deb

##8. clean up the dependencies we installed from step 4

$ sudo apt remove vips-build-deps
$ sudo apt autoremove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment