Skip to content

Error sudo: command not found #32

Closed

Description

@marcandre

I'm trying to install chromedriver on Github actions, but getting:

Run nanasess/setup-chromedriver@master
  with:
    chromedriver-version: 88.0.4324.96
/usr/bin/docker exec  09fd831c857ab493aa5bdd18081d4d0f2275269062204f74c4f050c7276a208e sh -c "cat /etc/*release | grep ^ID"
##setup chromedriver
/__w/_actions/nanasess/setup-chromedriver/master/lib/setup-chromedriver.sh 88.0.4324.96 linux64
/__w/_actions/nanasess/setup-chromedriver/master/lib/setup-chromedriver.sh: line 11: sudo: command not found
Error: The process '/__w/_actions/nanasess/setup-chromedriver/master/lib/setup-chromedriver.sh' failed with exit code 127

Our workflow looks like this:

name: Review

on:
  pull_request:
jobs:
  review:
    runs-on: ubuntu-latest
    timeout-minutes: 60
    container:
      image: elixir:1.12.1-slim
    services:
      postgis:
        image: mdillon/postgis:11
        ports:
          - 5432:5432
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: postgres
          POSTGRES_HOST: "/"
    steps:
    - uses: actions/checkout@v2
    - uses: nanasess/setup-chromedriver@master
      with:
        # Optional: do not specify to match Chrome's version
        chromedriver-version: '88.0.4324.96'

I tried without the with: ..., same result.

Any idea?

Activity

  1. nanasess commented on Aug 26, 2021

    @nanasess
    Owner

    @marcandre Welcome to setup-chromedriver, thanks for the detailed issue.
    The elixir-slim docker image does not seem to include sudo.
    Until setup-chromedriver is supported, how about adding step like this?

    run: apt-get install -y sudo
  2. marcandre commented on Aug 26, 2021

    @marcandre
    Author

    Wow, this shows I n00b I am with devops 🤯

    I added run: apt-get update && apt-get install -y sudo and that got the sudo issue fixed 🎉

    Thanks

  3. marcandre commented on Aug 26, 2021

    @marcandre
    Author

    Oh, now it complains about not finding google-chrome 😢.

    That's not part of this setup script?

  4. nanasess commented on Aug 27, 2021

    @nanasess
    Owner

    @marcandre Sorry, Installing google-chrome is also not yet supported.
    Please try adding google-chrome-stable to the apt-get install -y command.

    run: |
        wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
        sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
        apt-get update && apt-get install -y sudo google-chrome-stable

    We plan to support the installation along with sudo.

  5. marcandre commented on Aug 27, 2021

    @marcandre
    Author

    You're fabulous, thank you ❤️

    Anyone reading this for elixir: do not use the -slim versions of images, as other packages are missing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions