当前位置: 首页 > news >正文

Ubuntu 18.04 配置sources.list源文件(无法安全地用该源进行更新,所以默认禁用该源)

如果你 sudo apt update 时出现诸如 无法安全地用该源进行更新,所以默认禁用该源 的错误,那就换换源吧,链接:

https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/

注意版本:

在这里插入图片描述

修改源文件:

sudo nano /etc/apt/sources.list
# or
sudo vim /etc/apt/sources.list
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

如果是使用 nano

  • 保存:controlnet + O,然后回车
  • 退出:control + X

然后:

sudo apt-get update

下载速度慢可以换一下源:https://www.bcskill.com/index.php/archives/881.html

如果出现以下报错:

正在读取软件包列表... 完成                                                                                                                                                                                     
E: 仓库 “http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

PPA 的源配置通常保存在 /etc/apt/sources.list.d/目录中,你需要检查这个目录是否有名为 ubuntu-toolchain-r-ubuntu-test-bionic.list 或类似的文件,这个文件可能仍然指向错误的 PPA,检查是否包含它:

ls /etc/apt/sources.list.d/sudo vim /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-bionic.list

注释掉里面的内容,或者不用的话删除这个文件。

http://www.lryc.cn/news/486544.html

相关文章:

  • 19.UE5道具掉落
  • MySQL —— MySQL逻辑架构与查询过程
  • ODOO学习笔记(12):自定义模块开发
  • Excel单元格中自适应填充多图
  • 20.useMediaQuery
  • 无人机场景 - 目标检测数据集 - 车辆检测数据集下载「包含VOC、COCO、YOLO三种格式」
  • 聚合查询(查询)
  • QT QLineEdit失去焦点事件问题与解决
  • Remora
  • MySQL中将一个字符串字段按层级树状展开
  • vue面试题8|[2024-11-14]
  • ARM(安谋) China处理器
  • 基于python Django的boss直聘数据采集与分析预测系统,爬虫可以在线采集,实时动态显示爬取数据,预测基于技能匹配的预测模型
  • MATLAB实现GARCH(广义自回归条件异方差)模型计算VaR(Value at Risk)
  • 深入Linux基础:文件系统与进程管理详解
  • 缓存及其不一致
  • Leetcode 有效的数独
  • 《Java核心技术 卷I》用户界面中首选项API
  • Android 中的 Zygote 和 Copy-on-Write 机制详解
  • 【人工智能】从零开始用Python实现逻辑回归模型:深入理解逻辑回归的原理与应用
  • 推荐一款功能强大的光学识别OCR软件:Readiris Dyslexic
  • Python爬虫----python爬虫基础
  • css-50 Projects in 50 Days(3)
  • 另外一种缓冲式图片组件的用法
  • 字节青训-小C的外卖超时判断、小C的排列询问
  • PHP 伪静态详解及实现方法
  • Spring Boot 简单预览PDF例子
  • 【魔珐有言-注册/登录安全分析报告-无验证方式导致安全隐患】
  • LabVIEW 使用 Snippet
  • 单片机_day3_GPIO