Problems installing Terraform on Kali Linux


I follow the steps to install Terraform on my Linux here: Install Terraform | Terraform - HashiCorp Learn

But the last command: sudo apt-get update && sudo apt-get install terraform
Gives this:

Ign:1 kali-rolling InRelease
Err:2 kali-rolling Release
404 Not Found [IP: 443]
Reading package lists… Done
E: The repository ‘ kali-rolling 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.

Anyone know how I can fix it?

You may want to check this old post:

Also, since Terraform itself is just a single executable file, you can just download a binary that supports your distribution, and using a package manager is optional:

Hi @rogern,

Kali Linux is not one of the distributions supported by our APT repository, so this is unfortunately a correct error.

If Kali Linux is sufficiently similar to one of the supported distributions then you may be able to change the distribution name in sources.list file or sources.list.d/* file to select one of those instead of kali-rolling instead, but I’m not familiar enough with Kali Linux to say whether that is true and, if so, which of the supported distributions would be most suitable to choose.

As @shohei noted, you can also directly download the main .zip release archives and extract them to get a terraform executable. The APT packages for Terraform on just wrap that same executable with APT metadata, and so an executable installed in that way should behave identically to one installed using APT.