Why is the ubuntu-latest container claiming that sudo doesn't exist? It kind of _has to_ in order to run installers.
slname: CI-CD
on:
push:
branches:
- master
jobs:
tex:
name: Installing TeX Live and ((Xe)La)TeX related packages
runs-on: ubuntu-latest
shell: bash
steps:
- name: Installing TeX Live
run: |
sudo apt-get update
This crashes, even though it _never_ should:
[ci.yml/Installing TeX Live and ((Xe)La)TeX related packages] �🚀 Start image=node:12.6-buster-slim
[ci.yml/Installing TeX Live and ((Xe)La)TeX related packages] �🐳 docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[ci.yml/Installing TeX Live and ((Xe)La)TeX related packages] ⭐ Run Installing TeX Live
| /github/workflow/0: line 2: sudo: command not found
[ci.yml/Installing TeX Live and ((Xe)La)TeX related packages] ❌ Failure - Installing TeX Live
Error: exit with `FAILURE`: 127
+1; installing the sudo package is also not required on the actual Github Actions. I currently work around this by doing apt update && apt install sudo prior to my regular workflow, just for act to run without this initial failure.
Issue is stale and will be closed in 7 days unless there is new activity
The issue is still prevalent and prohibits running many actions.
@Senui where do you insert this line?
@Senui where do you insert this line?
I just add it as the first step:
jobs:
tex:
name: Installing TeX Live and ((Xe)La)TeX related packages
runs-on: ubuntu-latest
shell: bash
steps:
- name: Install sudo package
run: apt update && apt install sudo
- name: Installing TeX Live
run: |
sudo apt-get update
@Senui where do you insert this line?
I just add it as the first step:
Ah gotcha, i guess installing it again (from the perspective of the actual GitHub actions running on the web) won't cause any harm. Thanks! :)
I'm having this problem too. Can it be reopened? @nektos
One solution is to use the alternative image.
See https://github.com/nektos/act#alternative-runner-images
For the sake of completeness, here is the text from the README:
If you need an environment that works just like the corresponding GitHub runner then consider using an image provided by nektos/act-environments:
- nektos/act-environments-ubuntu:18.04 - built from the Packer file GitHub uses in actions/virtual-environments.
:warning: :elephant:
*** WARNING - this image is >18GB 😱***
given that the main problem is that sudo is no preinstalled, which takes up near as makes no difference literally no space at all, I'd much rather see sudo added to the base package. Anything else, we can install ourselves, but either the image has "root perms for everything" so that no su permissions are needed, or it comes with the few kb worth of sudo preinstalled so that things just work. Heck, even on a full perms image, sudo should exist and just do nothing special. It's not an optional command, too much relies on it merely existing =)
Most helpful comment
I'm having this problem too. Can it be reopened? @nektos