Skip to content

Error installing dependencies on Ubuntu self-hosted runnner #597

@jasons42

Description

@jasons42

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions