我最近开始的一些GitHub操作工作流在安装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
我所尝试的
1.我从here和here中了解到,添加sudo apt-get --allow-releaseinfo-change update
或sudo apt-get dist-upgrade
可以解决问题,但即使将它们添加到我的工作流程中也没有解决问题。
1.我尝试使用此操作setup-chromedriver,但在遵循文档时返回相同的错误:
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
1.因为它似乎与 Debian 10(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
命令。*
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
3条答案
按热度按时间ttygqcqt1#
我知道你试过
但对我很有效
这是我在dockerfile中的命令:
不需要:
rm -rf /var/lib/apt/lists/*
lfapxunr2#
FWIW,您可以通过添加
specialist options
来限制您允许绕过apt-secure
的字段,从而降低使用此选项(--allow-releaseinfo-change
)的风险。从man apt-get
:Maven选项(--allow-releaseinfo-change-field)只允许更改某些字段,如origin、label、codename、suite、version和defaultpin。apt_preferences(5)。
例如,在Debian及其衍生产品
RPi OS
之间的bullseye
延迟发布所造成的当前bugaboo中,specialist option
将是suite
。这是因为buster
中的suite
标签已从stable
更改为oldstable
:91zkwejq3#
注意事项
这是一篇来自serverfault.com的交叉文章。
这也是相关的,因为我无法用接受的答案
apt-get --allow-releaseinfo-change-suite update
解决这个问题,而接受的答案具有安全性影响,实际上并没有解决从错误的仓库获取安全更新的潜在问题。问题
在Debian Stretch(9)Docker镜像上遇到了这个问题。
运行
apt-get update
时出现以下错误背景
这尤其与安全回购有关。
apt使用这些存储库定义来获取更新,它们在
/etc/apt/sources.list
中定义Debian官方安全建议-https://www.debian.org/security/
回答
在Dockerfile中添加此行
其他解决方案
什么对我不起作用:
--allow-releaseinfo-change
标志运行apt-无法识别与apt-get update配对的标志还有什么奏效了:
deb http://archive.debian.org/debian stretch main contrib non-free
代替bullseye security repo;从安全性的Angular 来看,最好还是坚持使用最新版本的安全性更新
如果你只是在放大安全回购问题,上面是正确的。
为什么我们的安全回购会有这些问题?
在我的例子中,Debian 9是一个存档的,不受支持的,未维护的版本。
虽然我可以“修复”(绕过)安全存储库,但我在APT的依赖性存储库方面遇到了进一步的问题。由于该版本已弃用,因此需要将这些存储库指向存档。
这让我不得不升级到Debian 10。在Debian 10上,我不需要上述修复。