The installed version is 4.1 and need to downgrade to 3.81. I searched apt for make 3.81, but I couldn't find it.

  • 4
    Ubuntu 14.04 came with 3.81, so it may be possible to download the package from the repo and install it, but that would be done with dpkg, not apt. And it likely has a lot of bug fixes in it, so it may not work exactly like the original 3.81 version. If you need 3.81 for compatibility testing, you should probably build it from source. If you need 3.81 to deal with an ancient Makefile, you can get help here to update that Makefile. – Mark Plotnick Jul 5 '16 at 22:54
  • 1
    I need it to build Android 2.1 from source. – LostSoul Jul 6 '16 at 21:16

Rather than downgrading packages in your normal system, I'd strongly suggest handling this kind of thing using a chroot or a container. Those allow you to keep whatever you need to build a particular bit of software in its own semi-isolated environment so that it doesn't conflict with anything else.

You can use schroot to manage chroots in such a way that they can access files in your home directory, which is convenient for ad-hoc development like this (for example, the Ubuntu SimpleSbuild wiki page explains how to set this up; you don't need sbuild itself, but mk-sbuild and sbuild-update are convenient ways to create and manage chroots.

Alternatively, recent versions of Ubuntu come with LXD, which is very handy for this kind of thing. Stéphane's series of blog posts is a good place to start, but basically you can do:

sudo apt install lxd
sudo lxd init
sudo adduser $USER lxd

... then either restart your user session or use newgrp lxd, then:

lxc launch ubuntu:14.04 android-build
lxc exec android-build bash

... and you're off to the races. If you want to give the container access to your home directory, that's a bit more fiddly due to user namespacing, but possible.


You could add the sources.list lines for 14.04 to your sources.list file then use apt update; apt install -t=trusty make

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.