Gui*_*urd 47 shell debian selenium-chromedriver debian-buster github-actions
我的一些 Github Actions 工作流最近开始在安装 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.
Run Code Online (Sandbox Code Playgroud)
这是我的步骤实现:
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.
Run Code Online (Sandbox Code Playgroud)
Docker 镜像实现:docker://guillaumefalourd/ritchiecli:py-3.8
1 - 我从这里和这里读到添加sudo apt-get --allow-releaseinfo-change update或sudo apt-get dist-upgrade可以解决问题,但即使将这些添加到我的工作流程中也没有解决它。
2 - 我尝试使用此操作setup-chromedriver但在遵循文档时返回相同的错误:
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
Run Code Online (Sandbox Code Playgroud)
3 - 因为它似乎与Debian Buster (?)有关,我也尝试使用另一个 ubuntu runner 版本作为 runner(ubuntu-18.04而不是ubuntu-latest),但没有任何改变,同样的错误。
编辑
后来我观察到问题发生在第一个命令中:(sudo apt-get update并且我在之后添加了另一个命令......)。
用它代替sudo apt-get --allow-releaseinfo-change update解决了我的问题。
因此,答案不添加sudo apt-get --allow-releaseinfo-change update到步骤执行的命令,但代替的sudo apt-get update为它命令。
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
Run Code Online (Sandbox Code Playgroud)
小智 47
我知道你试过了
apt-get --allow-releaseinfo-change update
Run Code Online (Sandbox Code Playgroud)
但它对我有用。
这是我在 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/*
Run Code Online (Sandbox Code Playgroud)
不需要: rm -rf /var/lib/apt/lists/*
小智 35
--allow-releaseinfo-changeFWIW,您可以通过添加“专家选项”来限制您允许绕过的字段,从而降低使用此选项 ( ) 的风险apt-secure。从man apt-get:
专业选项 (
--allow-releaseinfo-change-field) 的存在仅允许更改某些字段,例如来源、标签、代号、套件、版本和默认引脚。另请参见 apt_preferences(5)。
例如,在bullseyeDebian 及其衍生的 RPi 操作系统之间的延迟发布所造成的当前 bugaboo 中,专家选项将是suite. 这是因为 suite标签buster已从 更改stable为oldstable:
$ sudo apt-get --allow-releaseinfo-change-suite update
Run Code Online (Sandbox Code Playgroud)
这是来自 serverfault.com 的交叉帖子。
它在这里也很相关,因为我无法用接受的答案解决问题,apt-get --allow-releaseinfo-change-suite update并且接受的答案具有安全隐患,并且实际上并没有解决从错误的存储库获取安全更新的根本问题。
在 Debian Stretch (9) Docker 映像上遇到此问题。
运行时出现以下错误apt-get update
W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages 404 Not Found [IP: xx]
E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages 404 Not Found
E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Run Code Online (Sandbox Code Playgroud)
这尤其与安全存储库有关。
这些 repo 定义由 apt 使用来获取更新,它们定义在/etc/apt/sources.list
官方 Debian 安全建议 - https://www.debian.org/security/
To keep your Debian operating system up-to-date with security patches, please add the following line to your /etc/apt/sources.list file
`deb http://security.debian.org/debian-security bullseye-security main contrib non-free`
Run Code Online (Sandbox Code Playgroud)
在 Dockerfile 中添加这一行
RUN echo "deb http://security.debian.org/debian-security bullseye-security main contrib non-free" > /etc/apt/sources.list
RUN apt-get update
Run Code Online (Sandbox Code Playgroud)
什么对我不起作用:
--allow-releaseinfo-change- 与 apt-get update 配对的标志无法识别还有什么有效:
deb http://archive.debian.org/debian stretch main contrib non-free;从安全角度来看,最好坚持最新版本的安全性如果您只是关注安全存储库问题,则上述内容是正确的。
为什么我们的安全存储库会出现这些问题?
就我而言,Debian 9 是一个存档的、不受支持、无人维护的版本。
虽然我可以“修复”(绕过)安全存储库,但我对 APT 的依赖存储库还有更多问题。由于该版本已弃用,这些存储库需要指向存档。
一般来说,这迫使我升级到 Debian 10。在 Debian 10 上,我不需要上述修复。
| 归档时间: |
|
| 查看次数: |
11965 次 |
| 最近记录: |