Skip to content

Added apt update command to linux install docs.#7186

Merged
vilmibm merged 2 commits intocli:trunkfrom
srgk26:trunk
Mar 23, 2023
Merged

Added apt update command to linux install docs.#7186
vilmibm merged 2 commits intocli:trunkfrom
srgk26:trunk

Conversation

@srgk26
Copy link
Contributor

@srgk26 srgk26 commented Mar 17, 2023

Updating the install docs for Debian-based Linux systems to update apt first before attempting to install curl.

@srgk26 srgk26 requested a review from a team as a code owner March 17, 2023 14:33
@srgk26 srgk26 requested review from mislav and removed request for a team March 17, 2023 14:33
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Mar 17, 2023
@cliAutomation
Copy link
Collaborator

Hi! Thanks for the pull request. Please ensure that this change is linked to an issue by mentioning an issue number in the description of the pull request. If this pull request would close the issue, please put the word 'Fixes' before the issue number somewhere in the pull request body. If this is a tiny change like fixing a typo, feel free to ignore this message.

Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! What would happen if apt update didn't run before apt install in this case? Users would get a slightly outdated version of curl? That would be fine in my opinion

@srgk26
Copy link
Contributor Author

srgk26 commented Mar 20, 2023

No, sometimes curl can't be found by the apt repositories, which often happens in docker containers or systems that haven't run apt update in a long time. This is a screenshot of my docker container where I experienced this, which was what prompted me to submit this PR:

image

As you can see from the screenshot, the first sudo apt install curl didn't get recognised, but running sudo apt update && sudo apt install curl works.

The equivalent dnf update is not needed as far as I'm aware, this is more an idiosyncrasy for Debian-based systems.

@vilmibm
Copy link
Contributor

vilmibm commented Mar 22, 2023

There's merit to this; an out of date apt index can fail an install (as OP shows)

@vilmibm vilmibm merged commit 82927b0 into cli:trunk Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants