shell 存储库“http:security.debian.org/debian-security buster/updates InRelease”将其“Suite”值从“stable”更改为“oldstable”

k4ymrczo  于 2023-05-07  发布在  Shell
关注(0)|答案(3)|浏览(495)

我最近开始的一些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.我从herehere中了解到,添加sudo apt-get --allow-releaseinfo-change updatesudo 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
ttygqcqt

ttygqcqt1#

我知道你试过

apt-get --allow-releaseinfo-change update

但对我很有效
这是我在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/*

lfapxunr

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

$ sudo apt-get --allow-releaseinfo-change-suite update
91zkwejq

91zkwejq3#

注意事项

这是一篇来自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.

背景

这尤其与安全回购有关。
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`

回答

在Dockerfile中添加此行

RUN echo "deb http://security.debian.org/debian-security bullseye-security main contrib non-free" > /etc/apt/sources.list

RUN apt-get update

其他解决方案

什么对我不起作用:

  • 将repo更改为稳定安全
  • 使用--allow-releaseinfo-change标志运行apt-无法识别与apt-get update配对的标志

还有什么奏效了:

  • 你可以使用stretch archive repo deb http://archive.debian.org/debian stretch main contrib non-free代替bullseye security repo;从安全性的Angular 来看,最好还是坚持使用最新版本的安全性

更新

如果你只是在放大安全回购问题,上面是正确的。
为什么我们的安全回购会有这些问题?
在我的例子中,Debian 9是一个存档的,不受支持的,未维护的版本。
虽然我可以“修复”(绕过)安全存储库,但我在APT的依赖性存储库方面遇到了进一步的问题。由于该版本已弃用,因此需要将这些存储库指向存档。
这让我不得不升级到Debian 10。在Debian 10上,我不需要上述修复。

相关问题