Debian repo outdated?

Seems the debian repo is stuck at 2.2.14 while the latest binary release 2.2.18.

 $ curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -

sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

sudo apt-get update && sudo apt-get install vagrant
OK
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian buster-updates InRelease                                             
Hit:3 http://security.debian.org/debian-security buster/updates InRelease                               
Hit:4 http://ftp.debian.org/debian buster-backports InRelease                                           
Hit:5 https://apt.releases.hashicorp.com buster InRelease                                               
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
vagrant is already the newest version (1:2.2.14).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 Like

Hi,

Checked this just now on a ubuntu instance, then a buster instance just to ensure the same environment and the install provided me with the latest version. Are you still experiencing this issue?

seems to be resolved. Thanks.

I could just be doing something stupid, but I’m hitting the exact problem described with 2.2.14 being offered by apt, but 2.2.18 being latest. Brand new Debian 11 install, and I was able to install vault, consul, and terraform from the hashicorp repo using apt commands. Vagrant however, as the OP notes, is not cooperating.

I’m not sure how to resolve it, any suggestions are appreciated - but it might be some kind of conflict with the debian OS repos?

$ apt info vagrant -a
Package: vagrant
Version: 2.2.14+dfsg-1
Priority: optional
Section: admin
Maintainer: Debian Ruby Team <pkg-ruby-extras-maintainers@lists.alioth.debian.org>

With apt info vagrant -a it shows both the above described 2.2.14, and also offers 2.2.3 from the deb maintainers.

When I do the same lookup for terraform, the maintainer is HashiCorp <support@hashicorp.com>.

I don’t know enough about apt to understand how it determines what to offer, but maybe the extra string +dfsg-1 after the version is making apt think the 2.2.18 is an older version? Maybe the priority field?

What does the policy look like (apt-cache policy vagrant)?

I’m getting the same error, but with Ubuntu 22.04. The problem is the output of apt-cache policy vagrant as @chrisroberts was asking:

$ apt-cache policy vagrant
vagrant:
  Installed: 2.2.19+dfsg-1ubuntu1
  Candidate: 2.2.19+dfsg-1ubuntu1
  Version table:
 *** 2.2.19+dfsg-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status
     2.2.19 500
        500 https://apt.releases.hashicorp.com jammy/main amd64 Packages
     2.2.18 500
        500 https://apt.releases.hashicorp.com jammy/main amd64 Packages
     2.2.17 500
        500 https://apt.releases.hashicorp.com jammy/main amd64 Packages
     2.2.16 500
        500 https://apt.releases.hashicorp.com jammy/main amd64 Packages
     2.2.15 500
        500 https://apt.releases.hashicorp.com jammy/main amd64 Packages
     2.2.14 500
        500 https://apt.releases.hashicorp.com jammy/main amd64 Packages
     2.2.13 500
        500 https://apt.releases.hashicorp.com jammy/main amd64 Packages
     2.2.12 500
        500 https://apt.releases.hashicorp.com jammy/main amd64 Packages
     2.2.11 500
        500 https://apt.releases.hashicorp.com jammy/main amd64 Packages
     2.2.10-4 500
        500 https://apt.releases.hashicorp.com jammy/main amd64 Packages
     2.2.9 500
        500 https://apt.releases.hashicorp.com jammy/main amd64 Packages

Basically, HashiCorp is not prioritizing their packages higher than the the base package which comes with Ubuntu. So if you run apt-get install vagrant, the default will be the version that comes with the base OS repositories by default.

This is easy to correct, but AFAIK, HashiCorp must adjust this on their end.

Similarly, the latest version of terraform in the ubunt repositories (including 22.04 and 22.10) is 1.3.7.

So, if you want a recent version of a package, it seems like using the apt repo is not the way to go.