Apt install terraform fails (as per docs)

sudo apt-get update && sudo apt-get install terraform

implemented according to the docs: Install Terraform | Terraform - HashiCorp Learn fails with

E: The repository 'https://apt.releases.hashicorp.com uma Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Linux Mint 20 (Ubuntu 20.02 aka Ubuntu 20.04)

Hi @alexander-potemkin,

It looks like the problem here is that you have the distribution name “uma”, which is not one of the supported distribution names in the HashiCorp APT repository.

You can refer to Supported Debian and Ubuntu Releases to see what’s supported in this repository. As you’ll see, there’s no official support for Linux Mint, but as you noted Linux Mint is similar to Ubuntu, and so it’s possible that you could get a working result by using the Ubuntu release name that’s closest to your Linux Mint release.

Since you said Linux Mint 20 is similar to Ubuntu 20.04, I think the closest distribution name to try would be focal, which you’d write instead of uma in the APT sources file where you have apt.releases.hashicorp.com currently configured.

With that said, I can’t promise that these packages will work anywhere except the distribution they are intended for. If you try this and find other problems once you have the package installed then I’d suggest using one of the other installation strategies that isn’t distribution-specific, such as downloading and extracting the original .zip file that the APT and RPM packages are derived from.

Hi @apparentlymart and thanks!

Could you please, assist me with the ubuntu commands, so that they would execute nicely on all ubuntu derivatives?

Hi @alexander-potemkin,

I’m afraid I don’t have any direct experience with using unsupported Linux distributions. My guess would be that you could just replace the $(lsb_release -cs) substitution with literally focal, because I think that command is what’s inserting uma into your configuration right now, but you’d need to first go and remove the already-added incorrect entry from your APT sources, using whatever tool you normally use to manage your selected repositories.

what about the following replacement:

alex@x280linux:~$ cat /etc/os-release 
NAME="Linux Mint"
VERSION="20.2 (Uma)"
PRETTY_NAME="Linux Mint 20.2"

alex@x280linux:~$ cat /etc/os-release | grep UBUNTU_CODENAME | awk -F= '{print $2}'

The following command shall produce ‘parent’ Ubuntu release on they ‘children’

cat /etc/os-release | grep UBUNTU_CODENAME | awk -F= '{print $2}'