Ubuntu 20 image cannot locate packages


I am using the ubuntu-2004:202010-01 image to create an appimage. I need to be able to install some packages at the beginning of my script. For some reason the packages ‘patchelf’ and ‘desktop-file-utils’ cannot be located by apt, but when I try the same commands in my own installation of Ubuntu 20 they work fine. What am I doing wrong? Here are the commands I am running, the ‘apt install’ is where it fails.

sudo add-apt-repository universe
sudo add-apt-repository multiverse
sudo apt update
sudo apt install --allow-downgrades --allow-remove-essential --allow-change-held-packages python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot

This is the output:
‘universe’ distribution component is already enabled for all sources.
‘multiverse’ distribution component is already enabled for all sources.
Reading package lists… Done
Building dependency tree
Reading state information… Done
W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: Unable to locate package patchelf
E: Unable to locate package desktop-file-utils

It’s the combination of flags you are using. I made a quick example showing that they can be installed: https://app.circleci.com/pipelines/github/felicianotech/cci-testing-pub/383/workflows/28450004-a46f-4126-89b2-3019eecb5a9b/jobs/1224

Universe/multiverse is already enabled so that can be left out. I would use apt-get not apt in a scripted environment such as CircleCI. I hope that helps. :slight_smile: