问题描述
我最近启动的一些 GitHub Actions 工作流在安装 Chromedriver 时返回此错误:
Some of my GitHub Actions workflows started recently to return this error when installing Chromedriver:
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Reading package lists...
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
E: Repository 'http://deb.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
Error: Process completed with exit code 100.
这是我的步骤实现:
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://guillaumefalourd/ritchiecli:py-3.8
steps:
- name: Install Chrome Driver
run: |
sudo apt-get update
sudo apt-get install -y unzip xvfb libxi6 libgconf-2-4 gnupg2
sudo curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
sudo echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
sudo apt-get -y update
sudo apt-get -y install google-chrome-stable
wget -N https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
sudo mv -f ~/chromedriver /usr/local/bin/chromedriver
sudo chown root:root /usr/local/bin/chromedriver
sudo chmod 0755 /usr/local/bin/chromedriver
Docker 镜像实现:docker://guillaumefalourd/ritchiecli:py-3.8
Docker Image Implementation: docker://guillaumefalourd/ritchiecli:py-3.8
我从 here 和 这里 添加
sudo apt-get --allow-releaseinfo-change update
或sudo apt-get dist-upgrade
可以解决问题,但即使将这些添加到我的工作流程中也无法解决.
I read from here and here that adding
sudo apt-get --allow-releaseinfo-change update
orsudo apt-get dist-upgrade
could resolve the problem, but even adding those to my workflow didn't resolve it.
我尝试使用此操作 setup-chromedriver 但它返回相同遵循文档时出错:
I tried using this action setup-chromedriver but it returned the same error when following the documentation:
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'
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
因为它似乎与 Debian 10 (Buster) (?) 我也尝试使用另一个 Ubuntu 运行器版本作为运行器(ubuntu-18.04
而不是 ubuntu-latest
),但是没有任何改变,同样的错误.
As it seems to be related to Debian 10 (Buster) (?) I also tried to use another Ubuntu runner version as a runner (ubuntu-18.04
instead of ubuntu-latest
), but nothing changed, same error.
我该如何解决这个问题?
回答
我后来观察到问题发生在第一个命令:sudo apt-get update
(我在之后添加了另一个命令......).
How can I resolve this issue?
Answer
I observed afterwards that the problem was happening at the first command : sudo apt-get update
(and I was adding the other command after...).
用它代替 sudo apt-get --allow-releaseinfo-change update
解决了我的问题.
Substituting it for sudo apt-get --allow-releaseinfo-change update
resolved my problem.
因此,答案不是将 sudo apt-get --allow-releaseinfo-change update
添加到步骤执行的命令中,而是 替换 sudo apt-get update
命令.
Therefore the answer was not to add the sudo apt-get --allow-releaseinfo-change update
to the step executed commands, but substituting the sudo apt-get update
command for it.
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://guillaumefalourd/ritchiecli:py-3.8
steps:
- name: Install Chrome Driver
run: |
sudo apt-get --allow-releaseinfo-change update
sudo apt-get install -y unzip xvfb libxi6 libgconf-2-4 gnupg2
sudo curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
sudo echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
sudo apt-get -y update
sudo apt-get -y install google-chrome-stable
wget -N https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
sudo mv -f ~/chromedriver /usr/local/bin/chromedriver
sudo chown root:root /usr/local/bin/chromedriver
sudo chmod 0755 /usr/local/bin/chromedriver
推荐答案
我知道你试过了
apt-get --allow-releaseinfo-change update
但它对我有用.
这是我在 dockerfile 中的命令:
This is my command in the dockerfile:
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
&& apt-get --allow-releaseinfo-change update
&& apt-get install -y google-chrome-unstable
--no-install-recommends
&& rm -rf /var/lib/apt/lists/*
不需要:rm -rf/var/lib/apt/lists/*
这篇关于存储库“http://security.debian.org/debian-security buster/updates InRelease"将其“Suite"值从“stable"更改为“oldstable"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!