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

2020-08-13  本文已影响0人  Not灬Alone

前言

最近在再重新安装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

大功告成!

上一篇下一篇

猜你喜欢

热点阅读