【Ubuntu18.04更换国内源及404错误解决办法】

2023-05-16

Ubuntu18.04 arm换源方法 及 404错误解决办法

  • 换源
    • 将下面的任选一组源放入到上面的sources.list中,`保存退出并更新即可`
      • 清华源
      • 阿里源
      • 中科大源
  • 错误
    • apt-get update 后出现 404错误时
    • 如图:

换源

输入如下代码 代码片.

//先将原Ubuntu18.04的sources.list复制一份
sudo cp /etc/apt/sources.list /home
//再将文件打开 将里面的内容全部删除 换成国内源
sudo vim /etc/apt/sources.list
//保存ESC :wqa  并更新
sudo apt-get update

将下面的任选一组源放入到上面的sources.list中,保存退出并更新即可

清华源

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe

阿里源

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

中科大源

deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-proposed main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-proposed main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe

错误

apt-get update 后出现 404错误时

在刚刚的sources.list中的deb开头内容更改为 即可使用

deb [arch=amd64] http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb [arch=amd64] http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb [arch=amd64] http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb [arch=amd64] http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb [arch=amd64] http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

如图:

在这里插入图片描述

到这里404的问题已经解决,若出现的不是404问题请先尝试
ping www.baidu.com
查看网络是否有问题

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

【Ubuntu18.04更换国内源及404错误解决办法】 的相关文章

随机推荐

  • Excel 精选28个技巧

    文章目录 前言1 一键求和2 一键插入柱形图3 单元格内强制换行4 快速移动资料5 快速生成下拉式功能表6 计算带单位的数据7 小写金额转大写8 快速输入 9 批量添加下划线10 文字随单元格大小变化11 图片随单元格大小变化12 快速提取
  • 调度算法——时间片轮转、优先级、多级反馈队列(例题详细!!!)

    文章目录 前言知识总览时间片轮转 xff08 RR Round Robin xff09 优先级调度算法多级反馈队列调度算法知识回顾与重要考点 前言 此篇文章是我在B站学习时所做的笔记 xff0c 大部分图片都是课件老师的PPT xff0c
  • 生产者-消费者问题(有例题!!!)

    文章目录 前言问题描述如何实现思考 xff1a 能否改变相邻P V操作的顺序 知识回顾与重要考点 前言 此篇文章是我在B站学习时所做的笔记 xff0c 大部分图片都是课件老师的PPT xff0c 方便复习用 此篇文章仅供学习参考 提示 xf
  • 计算机网络习题——循环冗余校验

    3 07 要发送的数据为1101011011 采用CRC的生成多项式是 P X 61 X 4 43 X 43 1 试求应添加在数据后面的余数 xff08 1 xff09 若要发送的数据在传输过程中最后一个1变成了0 xff0c 即变成了11
  • 计算机网络课后答案(谢希仁第八版)

    计算机网络课后答案 谢希仁第八版
  • linux系统 删除文件命令

    Linux系统下删除文件是一个非常高频的需求 xff0c 几乎每天都会遇到 xff0c 所以rm命令是一个非常常用Linux命令 rm命令是英文单词 remove 的缩写 xff0c 它主要作用是 xff1a 1 删除文件 xff1b 2
  • 常见的HTTP状态码列表

    HTTP状态码列表 状态码 状态码英文名称 中文描述 1xx xff08 信息性状态码 xff09 xff1a 请求已被接受 xff0c 需要继续处理 100 Continue 继续 客户端应继续其请求 101 Switching Prot
  • 二进制的加减法_二进制加减法

    二进制的加减法 1 二进制加法 1 Binary Addition Since binary numbers consist of only two digits 0 and 1 so their addition is different
  • SQL注入攻击方法

    SQL注入攻击是一种利用Web应用程序中存在的安全漏洞 xff0c 通过在输入框中插入恶意的SQL代码 xff0c 从而实现对数据库的非法操作 以下是一些常见的SQL注入攻击方法 xff1a 使用单引号 xff08 39 xff09 进行字
  • 利用Python+selenium技术,实现浏览器基本操作详解,代码有详细注释

    首先 xff0c 需要安装selenium库和对应的浏览器驱动程序 以Chrome浏览器为例 xff0c 可以使用以下命令安装selenium和chromedriver xff1a pip install selenium 然后 xff0c
  • &和&&的区别(简单易懂)

    amp xff08 按位与 xff09 和 amp amp xff08 逻辑与 xff09 的区别如下 xff1a 1 amp amp 具有短路功能 xff0c 而 amp 不具有短路功能 2 当 amp 运算符两侧的表达式的结果均为真时
  • Spring框架学习笔记

    一 什么是Spring框架 Spring框架是由于软件开发的复杂性而创建的 Spring使用的是基本的JavaBean来完成以前只可能由EJB完成的事情 然而 xff0c Spring的用途不仅仅限于服务器端的开发 从简单性 可测试性和松耦
  • 人工智能——DBSCAN密度聚类(Python)

    目录 1 概述 1 1 概念 1 2 DBSCAN数据点分类 2 DBSCAN算法流程 2 1 DBSCAN算法流程 xff1a 2 2 举例 3 案例1 xff08 Python实现 xff09 3 1 案例 3 2 Python实现 3
  • @RequestMapping的参数和用法

    在Spring MVC 中使用 64 RequestMapping 来映射请求 xff0c 也就是通过它来指定控制器可以处理哪些URL请求 xff0c 相当于Servlet中在web xml中配置 源码 xff1a 该注解说明可以在类和方法
  • Linux 实验:记录型信号量 生产者-消费者问题详解

    进程同步问题是一个非常重要且相当有趣的问题 xff0c 因而吸引了很多学者对他进行研究 本文就选取其中较为代表性的生产者 消费者问题来进行学习 xff0c 以帮助我们更好的理解进程同步的概念及实现方法 一 问题描述 有一群生产者进程在生产产
  • Linux C语言线程解决生产者与消费者

    前言 生产者 消费者模式 xff0c 生产者这边负责生产产品 而消费者负责消费产品 xff0c 对于消费者来说 xff0c 没有产品的时候只能等待产品出来 xff0c 有产品就使用它 这里我们使用一个变量来表示这个这个产品 xff0c 生产
  • Mariadb

    文章目录 1 数据库的介绍2 mariadb的安装与开启3 软件基本信息4 数据库的安全初始化4 1 执行安全初始化脚本4 2 关闭数据库开放端口 5 数据库的基本管理5 1查看5 2新建5 3更改5 4备份与删除 6 数据库密码管理6 1
  • 【FPGA】按键消抖

    文章目录 一 按键消抖概述1 为何要进行按键消抖2 消抖的方式 二 系统设计1 系统模块划分2 系统时序图 三 代码实现1 按键消抖模块 xff08 key debounce xff09 2 呼吸灯模块 xff08 led breath x
  • java字符串添加字符_如何在Java中向字符串添加字符?

    java字符串添加字符 Case 1 In a simple way we will learn how to add characters by using predefined methods 情况1 xff1a 以简单的方式 xff0
  • 【Ubuntu18.04更换国内源及404错误解决办法】

    Ubuntu18 04 arm换源方法 及 404错误解决办法 换源将下面的任选一组源放入到上面的sources list中 xff0c 96 保存退出并更新即可 96 清华源阿里源中科大源 错误apt get update 后出现 404