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

标签 shell selenium-chromedriver debian github-actions debian-buster

关闭。这个问题不符合 Stack Overflow guidelines 。它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 Stack Overflow 的 on-topic

3个月前关闭。
社区在3个月前审查了是否重新打开这个问题并关闭了它:

原始关闭原因未解决





Improve this question




我的一些 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.
这是我的步骤实现:
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
我试过的
  • 我从 herehere 中读到,添加 sudo apt-get --allow-releaseinfo-change updatesudo apt-get dist-upgrade 可以解决问题,但即使将它们添加到我的工作流程中也无法解决问题。
  • 我尝试使用此操作 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
    
  • 因为它似乎与 Debian 10 (Buster) (?) 有关,我还尝试使用另一个 Ubuntu 运行器版本作为运行器( 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
    

    最佳答案

    我知道你试过了

    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/*

    关于shell - 存储库 'http://security.debian.org/debian-security buster/updates InRelease' 将其 'Suite' 值从 'stable' 更改为 'oldstable',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68802802/

    相关文章:

    bash - Shell 脚本未运行,未找到命令

    bash - 在本地和远程机器上运行的 Shell 脚本

    shell - Emacs 中 char 运行模式 (ansi-term) 的键盘快捷键

    Java Selenium Chromedriver加载Cookie但不使用它们

    基于 Linux/Debian 的应用程序无法编译

    shell - 将变量从一个 shell 脚本导出到另一个 shell 脚本

    java - 在不使用 XPath 或 CssPath 的情况下捕获 WebElement 的任何方法

    python - selenium.common.exceptions.WebDriverException : Message: Can not connect to the Service chromedriver. exe 打开 chrome 浏览器

    git - 尝试克隆 git 存储库时出现 "ERROR:gitosis.serve.main:Repository read access denied"

    bash - 如何从 bash 函数中打印换行符