ubuntu报错 E:无法定位软件包 |
您所在的位置:网站首页 › ubuntu无法定位软件包ntpdate › ubuntu报错 E:无法定位软件包 |
产生 E:无法定位软件包安全提示原因有很多。如网络链接问题、apt 源过期了。 解决方法: 1、备份 /etc/apt/sources.list 文件 执行命令 sudo cp /etc/apt/sources.list /etc/apt/sources.list.old 2、打开文件 sudo vim /etc/apt/sources.list 3、复制清华源(Ubuntu20.04 配置如下) 要根据自己的系统配置对应的镜像源,可参考Ubuntu 镜像使用帮助 # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 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 # 预发布软件源,不建议启用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse4、重新获取软件包列表 sudo apt-get update sudo apt-get upgrade 5、在执行安装命令 sudo apt-get install 软件包名 可以成功安装了。 sudo apt-get update -- 从服务器获取软件列表,并在本地保存为文件。 sudo apt-get upgrade -- 本地安装软件与本地软件列表对比,如本地安装版本低,会提示更新。
|
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |