1

I'm trying to install a specific version of CrateDB, for example:

$sudo apt-get -s install crate=2.1.8-1~wheezy

but this package is not found.

Running 'apt-cache madison' only shows the latest version:

$sudo apt-cache madison crate
     crate | 2.2.3-1~wheezy | https://cdn.crate.io/downloads/apt/stable wheezy/main amd64 Packages
     crate | 2.2.3-1~wheezy | https://cdn.crate.io/downloads/apt/stable wheezy/main i386 Packages

Crate.io repository in sources.list:

deb https://cdn.crate.io/downloads/apt/stable/ wheezy main
deb-src https://cdn.crate.io/downloads/apt/stable/ wheezy main

All versions that are actually available (including 2.1.8-1~wheezy ): https://cdn.crate.io/downloads/apt/stable/pool/main/c/crate/

How can I make apt see all the available packages and not just the latest one?

(I'm on Ubuntu 16.04.1 LTS)

  • Why are you using Debian repos? – user692175 Nov 16 '17 at 20:03
  • @michaelbay I have no idea, just following the vendor's installation instructions... What are the alternatives? – Olav Nov 19 '17 at 13:17
3

Debian repositories (including Ubuntu) are designed to have only one candidate available for a package. By default, that's the newest version available for that release. You cannot change that - it's upstream, and the version is designated in the repository's Release file.

Warning: It's usually unwise to use Debian packages in Ubuntu unless you really know what you are doing. There are many reasons for this.

Warning: Downgrading a package is possible, but is unsupported. If you try it, and it doesn't work for whatever reason, then the best advice you will get is to revert to the correct version for your release of Ubuntu. A wrong-version package may cause all kinds of dependency problems. (That's why Debian repos don't play that game)

Step 1: Download the package to a location where you will find it again. In this case, let's put in the Downloads dir:

wget -o ~/Downloads/ https://cdn.crate.io/downloads/apt/stable/pool/main/c/crate/crate_2.1.8-1~wheezy_all.deb

Step 2: Uninstall the newer crate, install the older crate:

sudo apt remove crate
sudo apt install ~/Downloads/crate_2.1.8-1~wheezy_all.deb

Step 3: Prevent apt from upgrading crate automatically

sudo apt-mark hold crate
sudo apt-mark unhold crate <---- Someday (not today) you will need this to undo the hold
  • Thank you for your answer, much appreciated! For now I will use the install method you suggested. Also I haven't seen the apt-mark hold/unhold command before so those are good to know! With database systems you cannot always upgrade directly from an old version to the latest, you have to follow a specific upgrade path to avoid data corruption. Crate.io are now looking into updating the Release file to make older versions available, so hopefully it will be possible to do the installs directly using apt-get soon. – Olav Nov 19 '17 at 13:12
1

Thanks for bringing this to our attention. - This is because we were using the reprepo tool to manage our Debian and Ubuntu repositories, which unfortunately has the limitation of only allowing one version per package and distribution. We will be moving our release infrastructure to use something that allows us to keep old releases available.

However, for Ubuntu, it is advisable to install the CrateDB package from our DEB releases (https://cdn.crate.io/downloads/deb/...), not our APT, as stated here.

  • This seem like an excellent use case for Snap packaging. – user535733 Nov 26 '18 at 21:28

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.