1

What is the most convenient way to build and install packages that are found from Debian Tracker on Ubuntu 18.04 Bionic Beaver?

For example I am interested in this unstable version of gdal which cannot be found from Ubuntu bionic repository.

So I would need to build the package from source and install it's dependencies.

apt update
apt install -y build-essential devscripts equivs
dget https://deb.debian.org/debian/pool/main/g/gdal/gdal_3.2.2+dfsg-1.dsc
dpkg-source -x gdal_3.2.2+dfsg-1.dsc
cd gdal-3.2.2+dfsg/
mk-build-deps -i

Problem at the moment is that some of the dependencies are not found from Ubuntu repositories. Is it somehow possible to have them automatically installed from the debian source also?

Broken gdal-build-deps:amd64 Depends on libdeflate-dev:amd64 < none @un H >
  Removing gdal-build-deps:amd64 because I can't find libdeflate-dev:amd64
Afkaaja
  • 13
  • 1
    beep installing Debian packages on Ubuntu? Stop right there: https://wiki.debian.org/DontBreakDebian#Don.27t_make_a_FrankenDebian . What you can do instead is to build packages from sources, doing a sort of backport. – A.B May 17 '21 at 16:38
  • I understand. What about the dependencies? Is it possible to build and install them from source also? I edited the original post. – Afkaaja May 17 '21 at 18:05
  • Not really - some of those dependencies have dependencies! Either use Ubuntu or use Debian. Unfortunately, Ubuntu choose to use a .deb package naming scheme - but Ubuntu debs are mostly incompatible with Debian debs (and vice versa). – Jeremy Boden May 25 '21 at 15:58

1 Answers1

1

Since you’re using Ubuntu, you should use the Ubuntu package source code rather than Debian’s. The overall strategy is similar; you’d only need to change the dget line to

dget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/gdal/3.2.2+dfsg-1ubuntu1/gdal_3.2.2+dfsg-1ubuntu1.dsc

As you suspect, you’ll have to do this for any missing build-dependency, again using Ubuntu packages; so for libdeflate you’d use

dget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/libdeflate/1.7-1ubuntu1/libdeflate_1.7-1ubuntu1.dsc

See also How can I install more recent versions of software than what Debian provides?

Stephen Kitt
  • 434,908