起因:本小白的Linux微信崩了(再次批评微信不发布官方版,如有大牛有更好的版本,欢迎留言交流。),找不到原因,曲线救国装wine,发现这个钉子户毛病,物理机不想重装,决定拔钉子!

方法一:

  • 使用的源与系统不匹配,也可以理解为没有更新到最新的。
    以下提供Ubuntu20.04清华源:
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

当我更新后发现,仍然存在没有Release文件。

方法二:

  • 删除对应ppa文件,以下以我的为例:
    报错为:
E: 仓库 “http://ppa.launchpad.net/alexeftimie/ppa/ubuntu focal Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http://ppa.launchpad.net/baitsart/wallpaper-manager/ubuntu focal Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
E: 仓库 “http://ppa.launchpad.net/leolik/leolik/ubuntu focal Release” 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

由此可见,alexeftimie/ppa/ubuntu、baitsart/wallpaper-manager/ubuntu、leolik/leolik/ubuntu focal这仨为错误文件。因此打开存放目录:

cd /etc/apt/sources.list.d

然后找错误文件:即

ls

可以找到这三个文件alexeftimie-ubuntu-ppa-focal.list、baitsart-ubuntu-wallpaper-manager-focal.list、leolik-ubuntu-leolik-focal.list。然后将其删掉,但建议修改为bak,以免以后有用直接删除导致文件丢失。

mv alexeftimie-ubuntu-ppa-focal.list alexeftimie-ubuntu-ppa-focal.list.bak
mv baitsart-ubuntu-wallpaper-manager-focal.list baitsart-ubuntu-wallpaper-manager-focal.list.bak
mv leolik-ubuntu-leolik-focal.list leolik-ubuntu-leolik-focal.list.bak

最后返回根目录:

cd

再重新update一下就可以了~
当然,别的系统也是差不多这种解决方式,鉴于系统指令不同,可自行举一反三~

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐