方法1:

从系统管理->软件源 菜单中 激活软件源设置

image

选择 “主要” 等一会 出现一些扫描到的源 选一个同样在基础中也选一个即可

更新 过一会即可

结论:

此方法 效果不好 原因 截图中的官方的 软件仓库的主要 ,基础列表中都没有列出 阿里 163 源 。并且速度为不可达 。

**也可能是apt proxy 没有设置的原因 **。

方法二:

手工添加软件源。由于linux mint 国内直接支持的源比较少,但mint 是基于 ubuntu 或debian 。查找到 mint 对应的ubuntn/debian的版本。直接使用对应的ubuntn /debian的软件源即可
我使用的是linux mint (vanessa )基于 ubuntu 22 (jammy)改造 所以找到 国内的源 (阿里 163 清华,中科大)的源直接用即可。

1:设置apt proxy

设置方法有三种(一般上只需要其中一种就好,如果用第二种方法,第一种方法和第三种方法都不会起作用):

1.这是较常用的方法,建立或修改/etc/apt/apt.conf,加入以下内容:

Acquire::http::Proxy "http://wilson_ke:password@10.0.0.1:63333";
Acquire::https::Proxy "http://wilson_ke:password@10.0.0.1:63333";
Acquire::ftp::Proxy "http://wilson_ke:password@10.0.0.1:63333";

2.修改/etc/bash.bashrc,加入以下内容:

export http_proxy=http://wilson_ke:password@10.0.0.1:63333
export https_proxy=http://wilson_ke:password@10.0.0.1:63333
export ftp_proxy=http://wilson_ke:password@10.0.0.1:63333

3.修改/etc/environment,加入以下内容:

http_proxy=http://wilson_ke:password@10.0.0.1:63333
https_proxy=http://wilson_ke:password@10.0.0.1:63333
ftp_proxy=http://wilson_ke:password@10.0.0.1:63333

4.修改~/.bashrc

http_proxy=http://wilson_ke:password@10.0.0.1:63333
https_proxy=http://wilson_ke:password@10.0.0.1:63333
ftp_proxy=http://wilson_ke:password@10.0.0.1:63333

以上参考下面链接
————————————————
版权声明:本文为CSDN博主「wilsonke」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wilsonke/article/details/54285952

2 手工编辑 /etc/apt/sources.list 文件。这个目录和 /ec/apt/source.list.d 下的 list文件作用相同只保留一份即可

附注:sources.list.d目录下 只要 文件后缀是list则都看为是 软件源列表文件()

q清华源

默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

预发布软件源,不建议启用

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse********

阿里源

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

163源

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

中科大源

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

以上源参考 链接 https://www.linuxmi.com/ubuntu-22-04-apt-sources-list.html

3 执行 sudo apt update

4 执行sudo apt upgrade (可闲时执行)

posted on 2022-09-19 17:08  keleman  阅读(3260)  评论(0编辑  收藏  举报