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

Error installing dependencies on Ubuntu self-hosted runnner #597

Open
jasons42 opened this issue Sep 9, 2024 · 3 comments
Open

Error installing dependencies on Ubuntu self-hosted runnner #597

jasons42 opened this issue Sep 9, 2024 · 3 comments

Comments

@jasons42
Copy link

jasons42 commented Sep 9, 2024

Running into a strange error when trying to install dependencies on a self-hosted Ubuntu runner.

sudo apt-get update runs normally but then it seems like apt-get cannot be found when running the install command.

Run browser-actions/setup-chrome@facf10a55b9caf92e0cc749b4f82bf8220989148
Installing dependencies
/usr/bin/sudo apt-get update
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [128 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [128 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [128 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
Get:6 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease [24.6 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [1270 kB]
Get:10 http://ppa.launchpad.net/git-core/ppa/ubuntu focal/main amd64 Packages [3181 B]
Get:11 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [33.5 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [4079 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [4399 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1555 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [28.6 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [55.2 kB]
Get:18 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [3928 kB]
Get:19 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [3937 kB]
Get:20 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [30.9 kB]
Fetched 32.8 MB in 3s (12.8 MB/s)
Reading package lists...
/usr/bin/sudo apt-get install --yes --no-install-recommends libglib2.0-0 libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libgbm-dev libnss3-dev libxss-dev libasound2 xvfb fonts-liberation libu2f-udev xdg-utils
sudo: apt-get: command not found
Error: The process '/usr/bin/sudo' failed with exit code 1

Action config:

      - name: Setup Chrome
        uses: browser-actions/setup-chrome@facf10a55b9caf92e0cc749b4f82bf8220989148 # pin@v1
        id: setup-chrome
        with:
          install-dependencies: true

Ubuntu version info:

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

I was able to workaround this issue by adding my own step to install deps, which should be running the exact same commands:

      - name: Install Chrome dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y --no-install-recommends libglib2.0-0 libgconf-2-4 libatk1.0-0 libatk-bridge2.0-0 \
            libgdk-pixbuf2.0-0 libgtk-3-0 libgbm-dev libnss3-dev libxss-dev libasound2 xvfb fonts-liberation \
            libu2f-udev xdg-utils
@ueokande
Copy link
Collaborator

@jasons42
Thanks for your report. Can you reproduce it on GitHub-hosted Ubuntu runner? If it occurs only in the self-hosted runner, some configuration on.it would be wrong.

@igorbrites
Copy link

Facing the same issue with self-hosted runners, though if you notice @jasons42 logs, sudo apt-get update works right before the sudo apt-get install. How apt-get get missing right after it's being called?

@xxsvk
Copy link

xxsvk commented Oct 1, 2024

Have the same issue. Have a dynamic self-hosted runners, so chrome has to be installed with every run. Will you investigate it ?

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

No branches or pull requests

4 participants