系统相关
首页 > 系统相关> > 解决Ubuntu命令“sudo apt-get install”——“ E: 无法定位软件包”问题

解决Ubuntu命令“sudo apt-get install”——“ E: 无法定位软件包”问题

作者:互联网

1. 添加镜像源 (本文是清华源)。运行代码:

sudo vim /etc/apt/sources.list

添加如下内容:

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
 

2.更新源

sudo apt-get update

3.接下来便可以安装未成功安装的软件包了,并且速度会比之前更快

标签:mirrors,cn,get,restricted,sudo,apt,bionic,edu,multiverse
来源: https://blog.csdn.net/Joker00007/article/details/122540754