Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: install: fedora: incorrect instructions for dnf #35979

Closed
johnstcn opened this issue Nov 10, 2024 · 5 comments · Fixed by #35980
Closed

docs: install: fedora: incorrect instructions for dnf #35979

johnstcn opened this issue Nov 10, 2024 · 5 comments · Fixed by #35980

Comments

@johnstcn
Copy link

Terraform Version

Terraform v1.9.8
on linux_amd64

Affected Pages

https://developer.hashicorp.com/terraform/install#linux

subsection "Fedora"

What is the docs issue?

Current Terraform install command referenced on https://developer.hashicorp.com/terraform/install#linux is:

sudo dnf install -y dnf-plugins-core
sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
sudo dnf -y install terraform

Line 2 returns the following output:

sudo dnf config-manager --add-repo
Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments.

What does work for me:

sudo dnf config-manager addrepo --from-repofile=https://rpm.releases.hashicorp.com/fedora/hashicorp.repo

Looks like this was changed between dnf v3 and v5.

The Fedora project docs [1] are inconsistent on this subject and appear to reference both dnf config-manager --add-repo and dnf config-manager addrepo --repo-url

[1] https://docs.fedoraproject.org/en-US/quick-docs/adding-or-removing-software-repositories-in-fedora/#_adding_repositories

Additional information:

Linux 6.11.6-300.fc41.x86_64

$ cat /etc/fedora-release
Fedora release 41 (Forty One)

$ dnf --version
dnf5 version 5.2.6.2
dnf5 plugin API version 2.0
libdnf5 version 5.2.6.2
libdnf5 plugin API version 2.0

Loaded dnf5 plugins:
  name: builddep
  version: 1.0.0
  API version: 2.0

  name: changelog
  version: 1.0.0
  API version: 2.0

  name: config-manager
  version: 0.1.0
  API version: 2.0

  name: copr
  version: 0.1.0
  API version: 2.0

  name: needs_restarting
  version: 1.0.0
  API version: 2.0

  name: repoclosure
  version: 1.0.0
  API version: 2.0

Proposal

sudo dnf install -y dnf-plugins-core
sudo dnf config-manager addrepo --from-repofile=https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
sudo dnf -y install terraform

References

rpm-software-management/dnf5#1537

@johnstcn johnstcn added documentation new new issue not yet triaged labels Nov 10, 2024
@bschaatsbergen bschaatsbergen removed the new new issue not yet triaged label Nov 11, 2024
@bschaatsbergen
Copy link
Member

bschaatsbergen commented Nov 11, 2024

Hi @johnstcn,

Thank you for raising this issue and suggesting a potential solution.

I can replicate the behavior on Fedora Linux 41, which uses DNF5. It appears that DNF4 compatibility was intentionally broken in favor of new sub-commands introduced in DNF5 (rpm-software-management/dnf5#405). This works on Fedora Linux 40, which uses DNF4.

Regarding this change, the documentation on adding a repository appears only partially updated. I’ll submit a pull request to address this.

Since F41 is the latest supported release, we’ll ensure this is fixed on our side as well. Thanks!

@bschaatsbergen bschaatsbergen self-assigned this Nov 11, 2024
@bschaatsbergen
Copy link
Member

bschaatsbergen commented Nov 11, 2024

Cross-reference for a documentation update in the Fedora docs: https://pagure.io/fedora-docs/quick-docs/pull-request/783

@johnstcn
Copy link
Author

Thanks for the upstream PRs @bschaatsbergen !

@bschaatsbergen
Copy link
Member

bschaatsbergen commented Nov 11, 2024

Thanks for the upstream PRs @bschaatsbergen !

Thank you for letting us know about this!

@Kerwood
Copy link

Kerwood commented Jan 28, 2025

This should also be changed in these docs here: https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants