ubuntu18.04使用问题汇总(三):无法定位软件包

前言

最近在再重新安装Ubuntu18.04过程中,出现不少觉得对Ubuntu小白比较有用的问题解决方案,因此在此做出一些汇总,持续更新.....

apt安装软件包出现无法定位软件包

例如我的是无法定位软件包python-pip:
第一步,检查自己输入的包名是否错误,大小写也要注意。
第二步,更新。

$  sudo apt-get update

如果发现依然报错,执行第三步,替换源:
先备份

$ cd /etc/apt/
$ sudo cp sources.list sources.list.bb
$ sudo vi sources.list

替换为国内的源,一般选择阿里云的,清空sources.list,复制下面内容粘贴进去

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

之后

$ sudo apt update
$ sudo apt upgrade

大功告成!

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容