在新的 GitHub Actions 中,我正在尝试安装一个包以便在接下来的一个步骤中使用它。
name: CI
on: [push, pull_request]
jobs:
translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install xmllint
run: apt-get install libxml2-utils
# ...
然而,这种方法失败了
Run apt-get install libxml2-utils
apt-get install libxml2-utils
shell: /bin/bash -e {0}
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
##[error]Process completed with exit code 100.
怎么做最好?我需要使用 Docker 吗?
sudo apt-get install libxml2-utils
。 - runwufsudo
运行”,因此只需要像@runwuf建议的那样简单地执行“sudo apt-get”即可。 - rmunn