Skip to content

Instantly share code, notes, and snippets.

@renexu
Created January 24, 2019 19:46
Show Gist options
  • Save renexu/366648e488203f0853b8b6bdbaa225d7 to your computer and use it in GitHub Desktop.
Save renexu/366648e488203f0853b8b6bdbaa225d7 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
@pbowyer
Copy link

pbowyer commented Dec 2, 2021

@ideiasfrescas The script above worked for me to install libvips 8.12.1 on Ubuntu 18.04 with the following changes:

  • In step 1 I also had to install package equivs
  • In step 2 I downloaded wget https://github.com/libvips/libvips/releases/download/v8.12.1/vips-8.12.1.tar.gz
  • Between step 5 and step 6, I ran this to update the version number used in the Debian package:
    grep -s '8.7.4.1' -rl . | xargs sed -i 's/8.7.4/8.12.1/g'
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment