美文网首页
Debian12 更换更新依赖源

Debian12 更换更新依赖源

作者: 岑吾 | 来源:发表于2025-02-10 12:55 被阅读0次

用的是光盘安装且安装时未启用网络更新,结果没了光盘后就无法更新了。

一、编辑更新源文件

在终端中新建vi ~/sources.list,输入以下源选择一个自己喜欢的输入并保存

1、清华大学源

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

2、中科大源

deb https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware

3、腾讯源

deb https://mirrors.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.tencent.com/debian-security/ bookworm-security main
deb-src https://mirrors.tencent.com/debian-security/ bookworm-security main
deb https://mirrors.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib

4、阿里源

deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib

二、更新源

# 将~/sources.list复制并替换/etc/apt/sources.list
sudo cp ~/sources.list /etc/apt/sources.list

# 更新依赖
sudo apt-get upgrade

相关文章

  • Ubuntu-Nginx安装并设置开机自启

    为了安装更快和一次成功,先更换源: 添加东北大学源: 更新 安装依赖:gcc、g++依赖库 安装 pcre依赖库(...

  • Debian/Ubuntu Linux 安装使用 Yarn (

    初始项目 添加依赖包 升级依赖包 移除依赖包 查看下载源 更换下载源

  • gitlab的安装以及一些简单的配置

    更换yum源,更新软件包 开始安装gitlab 安装必要的依赖 安装Postfix来发送邮件通知 添加GitLab...

  • 在Archlinux下编译EDK2

    首先更换更快的源,并更新软件包 安装所需要的依赖 获取EDKII的最新资源 编译基础工具 对于Windows系统,...

  • cocoapods 安装

    更新Ruby 更换源(因为Ruby的软件源rubygems.org被屏蔽了,国内那无形之墙,我们需要来修改更换源,...

  • LANMP笔记

    更换aliyun的yum源、添加 epel源 预装libunwind 安装依赖文件 yum源安装php7.2 安装...

  • Laravel--入门篇(LAMP环境搭建)

    安装好ubuntu 系统,并且更新了最新资源(apt-get update),更新网络比较差的,更换源(阿里源) ...

  • Ubuntu16.04 LAMP安装

    安装好ubuntu 系统,并且更新了最新资源(apt-get update),更新网络比较差的,更换源(阿里源) ...

  • HomeBrew 安装软件慢的解决方法

    用原有的镜像下载非常慢 => ? 替换源,更新速度变成 => ? 第一步:更换源 第二步:更换 Homebrew-...

  • iOS 1分钟超简单配置pod环境

    2018.12.5更新 ruby的源地址更换 地址 所以现在需要更换源 如果报错 请使用命令 1. 查看源:sud...

网友评论

      本文标题:Debian12 更换更新依赖源

      本文链接:https://www.haomeiwen.com/subject/iggxpjtx.html