参考:https://blog.csdn.net/lishuaigell/article/details/124740342
出现这个错误的原因:多半是镜像源跟你的ubuntu系统版本不匹配导致的。
首先使用下列指令查看自己的系统的版本号:
lsb_release -a
发现自己的是:
即Codename为jammy。
接下来:
(1)编辑sources.list这个文件:
sudo gedit /etc/apt/sources.list
(2)将里面原先的注释掉,然后换成下面的阿里源:
#阿里源
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-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports 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