ubuntu docker相關錯誤記錄


  1. 添加 docker 官方 GPG key

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

    報錯:

    gpg: can't connect to the agent: IPC connect call failed

    解決方法:

    apt remove gpg
    apt install gnupg1
  2.  設置 docker 穩定版倉庫

    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

    報錯:

    add-apt-repository command not found

    解決方法:

    apt-get install software-properties-common
  3. 更新源

    sudo apt-get update
    

    報錯:

    Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease
    Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease
    Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease
    Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security InRelease
    Ign:5 https://download.docker.com/linux/ubuntu focal InRelease
    Err:6 https://download.docker.com/linux/ubuntu focal Release
      404  Not Found [IP: 13.227.60.113 443]
    Reading package lists... Done
    E: The repository 'https://download.docker.com/linux/ubuntu focal Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.

    解決方法:在 /etc/apt/source.list 文件中增加如下配置

    deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
    

    再次更新源

    sudo apt-get update
    

    報錯:

    Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease
    Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease
    Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease
    Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security InRelease
    Ign:5 https://download.docker.com/linux/ubuntu focal InRelease
    Get:6 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
    Err:7 https://download.docker.com/linux/ubuntu focal Release
      404  Not Found [IP: 13.224.166.20 443]
    Get:8 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [11.0 kB]
    Reading package lists... Done
    E: The repository 'https://download.docker.com/linux/ubuntu focal Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    

    解決方法:刪除 /etc/apt/source.list 

    https://download.docker.com/linux/ubuntu focal Release
    

      


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM