码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • 【docker】debian安装官方docker源解析IP404问题


    参考官方docker的apt安装过程,执行:

    # Add Docker's official GPG key:
    sudo apt-get update
    sudo apt-get install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
    
    # Add the repository to Apt sources:
    echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
      $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
      sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13

    出现404,问题

    Hit:1 https://mirrors.ustc.edu.cn/ubuntu jammy InRelease
    Ign:2 https://download.docker.com/linux/debian jammy InRelease
    Hit:3 https://mirrors.ustc.edu.cn/ubuntu jammy-updates InRelease
    Hit:4 https://mirrors.ustc.edu.cn/ubuntu jammy-backports InRelease
    Err:5 https://download.docker.com/linux/debian jammy Release
      404  Not Found [IP: 13.224.167.2 443]
    Hit:6 https://mirrors.ustc.edu.cn/ubuntu jammy-security InRelease
    Hit:7 https://mirrors.ustc.edu.cn/ubuntu jammy-proposed InRelease
    Reading package lists... Done
    E: The repository 'https://download.docker.com/linux/debian jammy 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.
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12

    解决方案:
    根据Ubuntu 的 docker 页面,问题是它应该https://download.docker.com/linux/ubuntu代替https://download.docker.com/linux/debian.

    sudo sed -i 's/debian/ubuntu/g' /etc/apt/sources.list.d/docker.list
    sudo apt update
    
    • 1
    • 2

    但是,如果这不能解决问题,请运行以下命令:

    sudo sed -i 's|docker.com/linux/debian|docker.com/linux/ubuntu|g' /etc/apt/sources.list
    sudo apt update
    
    • 1
    • 2
  • 相关阅读:
    【网络通信三要素】TCP与UDP快速入门
    【网关路由测试】——诊断路由测试
    HiveSQL和SparkSQL的区别和联系
    JDK自带javap命令反编译class文件和Jad反编译class文件(推荐使用jad)
    Springboot集成HBase使用案例
    git远程协作
    五分钟搭建开源ERP:Odoo,并实现公网远程访问
    HTTP反爬困境
    基于java+springmvc+mybatis+vue+mysql的班级管理系统
    计算机毕业设计Java高校教师科研文献管理系统(源码+系统+mysql数据库+lw文档)
  • 原文地址:https://blog.csdn.net/weixin_43645287/article/details/136294103
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号