Manylinux_2_31_armv7l update or not

I’m trying to make a github action to build a package that needs cairo.

By experiment I find that need to use apt-get update before searching with eg apt-cache search ^cairo-dev or apt-cache search ^libcairo2-dev.

Is it safe to update the package index?

Why would you think it wouldn’t be? apt-get update does nothing more than refresh its database of available packages – it doesn’t touch any installations.

That’s what I thought. I’m not a debian user and know lttle about what the pkg index involves. I certainly wouldn’t think of upgrading.

Note that “update” and “upgrade” mean different things in this context. Running apt-get update will update the local list of packages that are available remotely. Running apt-get upgrade will see if that list contains newer versions of installed packages and then download and install them replacing the old versions. That means that actually upgrading to latest versions is a two step process:

  • apt-get update to update the local list
  • apt-get upgrade upgrade to latest versions from the list

Typically when you do anything with apt-get (or related tools) you want to apt-get update first. Certainly in CI jobs you should apt-get update before otherwise using apt-* for anything.

1 Like