-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Description
Terraform Version
None (Wasn't able to install it)
Terraform Configuration Files
None
Expected Behavior
Should be able to install Terraform on Raspberry Pi 4 via Package Manager apt-get as required for Ansible.
Actual Behavior
The installation fails with the below message
ansibleuser@jumpbox-server:~$ sudo apt update
Hit:1 https://apt.releases.hashicorp.com focal InRelease
Hit:2 https://download.docker.com/linux/ubuntu focal InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
ansibleuser@jumpbox-server:~$ sudo apt-get install terraform
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package terraformSteps to Reproduce
On a Raspberry Pi 4 with vanilla Ubuntu LTS 20.04 (Focal Fossa) installed, please run the following commands
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main"sudo apt-get install terraform
Additional Context
This article mentions lack of support for non-amd64 packages while recommending to download binaries as an alternative.
It doesn't help to solve the problem since we'll be running a cluster of Pi4s and other pocket-computing devices with different OS (CentOS, Ubuntu, Raspbian..) in which Ansible will act as a de-facto method to install via respective package managers rather than copying binaries every time for install/upgrade.
Please note the apt output after changing architecture in /etc/apt/sources.list.d/terraform-install.list to arm64
ansibleuser@jumpbox-server:~$ cat /etc/apt/sources.list.d/terraform-install.list
deb [arch=arm64] https://apt.releases.hashicorp.com focal main
ansibleuser@jumpbox-server:~$ sudo apt update
Hit:1 https://apt.releases.hashicorp.com focal InRelease
Hit:2 https://download.docker.com/linux/ubuntu focal InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'https://apt.releases.hashicorp.com focal InRelease' doesn't support architecture 'arm64'Recently found this comment but modifying architecture in the repository list to linux_arm64 doesn't help either.
More References:
Really eager to get Terraform running on Pi4 so please let me know if any further information is required and/or if I could help in any way to fix this.
Activity
danieldreier commentedon Dec 30, 2020
Thanks @vinayhegde1990 - I am recategorizing this as a feature request rather than a bug, because this is not currently something we support or have documented as supporting.
vinayhegde1990 commentedon Dec 30, 2020
@danieldreier thanks for your inputs but given the older issues I've mentioned, I believe
arm64is available as a beta but not working as expected so this'd be a bug report.Let me know your thoughts.
apparentlymart commentedon Jan 8, 2021
Hi @vinayhegde1990,
The primary way we distribute Terraform is via archives at
releases.hashicorp.com, under theterraformdirectory. There you will find Terraform releases for all supported platforms.A separate team at HashiCorp maintains a system which repackages the
linux_amd64archives (both of Terraform and of various other HashiCorp products) into.debpackages for distribution atapt.releases.hashicorp.com. At present, that system only produces packages forlinux_amd64, as documented on the page about the APT repositories:The APT repository construction is not something that is directly under the control of our team, but since we know that the team who maintains it is intentionally only supporting
linux_amd64for now (and that's documented to be true), this issue is therefore an enhancement request for the APT repository team to consider generating packages for Debian'sarm64distribution too.In the meantime I suggest using the primary
.ziparchives instead, as mentioned in the documentation.vinayhegde1990 commentedon Jan 11, 2021
Hi @apparentlymart,
Thanks for sharing the releases, APT repositories URLs, and the availability of only
linux_amd64packages as of now, was already aware as they're well documented in the Terraform installation instructions page. Was also familiar with downloading the .zip archives as a temporary workaround since I explored the docs in-depth before raising this issue.If you review the linked issues/comments I've provided above, you yourself have mentioned
linux_arm64is available to be usable onarm64Linux fromv0.14.0as of Dec 2020.Could you kindly elaborate on why one should use .zip archives in-spite of the package presence (although it's not being fetched from the APT repos as of writing this) as your suggestion and the comment previously indicated seem contradictory.
nifr commentedon Feb 2, 2022
I came here searching for
arm64support of the official hashiscorp apt repository.Note:
The repository does include (some) arm64 packages.
terraformis (as of 2022-02-02) still not available from the official hashicorp apt repository 🥲You can get the list of available
arm64packages as follows:Similar you can get the list of
amd64packages as follows:terraform,nomadandnomad-enterpriseare only available foramd64.Compared to releases.hashicorp.com the list of available packages is in general pretty short.
apparentlymart commentedon Feb 2, 2022
Indeed, our release engineering team is gradually improving the packaging infrastructure but is doing so on a product-by-product basis because each product currently has its own release process. (Part of this effort is also standardizing on various components of the release process so that it's easier to add these things holistically in future, but we're not there yet.)
Terraform is on this list to get updated but hasn't been updated yet. We'll close this issue once the release engineering team lets us know that the full pipeline is in place for publishing
linux_arm64packages. Until then, my recommendation to use the.zippackages still stands; all other packages are derived from those anyway, so the executable you'd get from a hypothetical.debpackage would be byte-for-byte identical to the one already available in the corresponding.zippackage.vinayhegde1990 commentedon Feb 2, 2022
Thanks for the +1 @nifr
@apparentlymart while the fact
.zipis the baseline for all packages so a.debwould be identical is helpful but installing/updating via the zip is a laborious process on different OScould you please share an approximate date for the
arm64release and/or any help we can do to speed things upapparentlymart commentedon Feb 3, 2022
The only way I can think of for someone not on our release engineering team to help with this is to build their own unofficial
.debpackages for that platform which others could then use, if they are willing to trust the person publishing them.We will close this issue once the official packages are available.
crw commentedon Feb 3, 2022
This issue is very similar to #25571. I'm tempted to close this issue as it is essentially a subset of what is being requested in the aforementioned issue, however just on the off-chance we release
arm64without the docker wrapper, I'll leave this one open.aebrahim commentedon Mar 24, 2022
Please reconsider - this would really have made our lives a lot easier. For context, we develop out of a devcontainer. We updated it to install terraform, and everything worked great on linux (amd64). However, a couple of our developers use M1 macs (arm64 just like the raspberry pi 4), and the devcontainer stopped building for them. I'm sure we're not the only people who use devcontainers on m1 macs.
Also #27378 (comment) may be the perfect representation of Conway's Law ;)
generalovmaksim commentedon May 29, 2022
I'm MacOS M1 user and am suffering from the same issue. I use dev container and it isn't convenient to use installation via zip file.
thclark commentedon Aug 23, 2022
Yes, +1 here for the purpose of installing it in the devcontainers I supply to my team. Sounds like there's progress happening slowly but surely so hopefully this'll work it's way through soon, thanks @maintainers :)
[-]Support for ARM64 on Raspberry Pi4[/-][+]Publish arm64 Terraform packages in the HashiCorp "apt" repository (Debian/Ubuntu packages)[/+]stappersg commentedon Sep 20, 2022
This
github.comissue has now a link todebian.orgRequest For Packaging issue https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808940Because having software in Debian implies having it available for all release architectures. Also software in Debian will finds it's way to other
.deb/aptdistributions, e.g. Ubuntu.apparentlymart commentedon Sep 20, 2022
It seems that this Debian RFP originally started in 2015 while Terraform v0.6 was the current version, and consequently it got bogged down in the fact that Terraform v0.6 still had all of the HashiCorp-distributed providers directly in the main distribution and therefore the package would need to depend on the union of all dependencies of all of the providers.
Thankfully that hasn't been true since Terraform v0.10, and also with Terraform v1.0 establishing the v1.x compatibility promises the rate of change to Terraform is slower now and so probably a more appropriate speed for Debian's process such that the version available in Debian Stable is likely to remain useful for longer than Terraform v0.6 would've.
However, the state storage backends are still built in to the main Terraform distribution and so there is still some dependency surface area for those, beyond what Terraform Core itself needs.
With all of that said: we unfortunately don't have the resources to participate directly in the packaging processes for Debian and other distributions. While we certainly would not object to Terraform being packaged in Debian (nor should we!), I think it would be necessary for someone in the Debian developer community to manage that particular packaging. In particular, I don't think our methodology for building APT packages would be acceptable for the main Debian repository: we take literally the
terraformexecutable from the official.zippackages and copy it into a Debian binary package, whereas the main Debian repository must always be buildable from source code. That is technically possible to do but not how our own in-house packaging processes are built.vinayhegde1990 commentedon Jun 14, 2023
Hi @apparentlymart @danieldreier @crw, thanks for the detailed explanation on the differences between Terraform and Debian's packaging along with its limitations over the years.
I re-tested this on the Ubuntu Arm64 Docker image via running a vanilla Docker container with the following output.
Terraform's official supported architectures page still shows no support for
arm64as of 14th June 2023.As this thread was last discussed in 2022 so could any of you please confirm if there been any recent development since then for supporting Terraform v1.x
aptinstalls onarm64devices running Ubuntu OS>= v20.04 LTSsuch as Raspberry Pi4?crw commentedon Jul 6, 2023
@vinayhegde1990 yes, as of 1.4.3 we switched over to a new build system which added support for arm64 binaries in a variety of packages. I do not know if that version will run on Raspberry Pi 4. Thanks!
vinayhegde1990 commentedon Jul 9, 2023
Thanks @crw for the info on arm64 support from Terraform
v1.4.3👍🏻I suggest updating the relevant download links and documentation (like the official architectures page, release notes, API guides, blog posts etc..) to align with this change and help people save time herewith.
github-actions commentedon Dec 14, 2023
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.