-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Ubuntu: Document requirement to always run "apt-get update" before install #2924
Labels
Comments
6 tasks
Just an update, we are working with docs team on updating GH documentation. |
glebm
added a commit
to od-contrib/commander
that referenced
this issue
Apr 12, 2021
Perfect, thank you @maxim-lobanov |
This was referenced May 3, 2021
This was referenced Jun 24, 2021
kmk3
added a commit
to kmk3/firejail
that referenced
this issue
Mar 21, 2023
This should fix installing packages on build-extra.yml. Note that this is already done on build.yml and on gitlab-ci.yml. From the GitHub Actions documentation[1] [2]: > Note: Always run `sudo apt-get update` before installing a package. In > case the `apt` index is stale, this command fetches and re-indexes any > available packages, which helps prevent package installation failures. [1] https://docs.github.com/en/actions/using-github-hosted-runners/customizing-github-hosted-runners [2] actions/runner-images#2924
dairiki
added a commit
to lektor/lektor
that referenced
this issue
Apr 2, 2023
pbatard
added a commit
to pbatard/ntfs-3g
that referenced
this issue
May 20, 2023
pbatard
added a commit
to pftf/pitf
that referenced
this issue
May 24, 2023
* Also fix GitHub Actions 404 errors when running apt install (See actions/runner-images#2924)
dairiki
added a commit
to dairiki/lektor
that referenced
this issue
Sep 11, 2023
5 tasks
16 tasks
donno2048
added a commit
to donno2048/snake
that referenced
this issue
Feb 6, 2025
- use `--no-install-recommends` - adhere to actions/runner-images#2924
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
This is a documentation gap/"bug".
As explained in #1757, virtual environments are carefully version controlled to make test results reliable and predictable. They do not include the very latest software as soon as it is released by Ubuntu but only some time later after some image validation first.
As an unfortunate side-effect, the apt package indexes in virtual environments can point at old (and insecure?) package dependencies that have been removed by Ubuntu, which means
apt-get install
commands can fail. See several examples in #1757The fix/workaround is of course that everyone must run
apt-get update
before anyapt-get install
, however this is not documented and should be, hence this issue.It is IMHO important to document this
apt-get update
requirement because it's not obvious:Many (most?) other Ubuntu installations run
apt-get update
in the background and do not have this requirement.It's a bit confusing because virtual environments are updated from time to time, just more slowly. This makes
apt-get install
failures unpredictable, they come and go for no obvious reason. See examples in Update Ubuntu images packages more frequently and/or run "sudo apt update && sudo apt upgrade" as part of job setup #1757Each worflow of each project running
apt-get update
takes some time (~10s?) and is a massively duplicated effort that would be much more efficient at the image level - without affecting test results predictability.apt-get update
has no effect on test results unless you actuallyapt-get install
something (and then you can forget about determinism anyway).Area for Triage:
Containers or Packages?
( See https://github.com/actions/virtual-environments/tree/main/triage-rules.yml for areas)
Question, Bug, or Feature?:
Documentation gap/"bug"?
(Choose "Question", "Bug", or "Feature" )
Virtual environments affected
Image version
Version: 20210309.1
Expected behavior
More documentation.
Actual behavior
Less documentation.
Repro steps
The text was updated successfully, but these errors were encountered: