首先查看本身的ubuntu系统的codename,直接致使你更新的源是否对你的系统起效果,查看方法: lsb_release -ashell
benny@benny:/etc/apt$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04 LTS Release: 18.04 Codename: bionic benny@benny:/etc/apt$
个人系统显示:Codename: bionicubuntu
登录如下网页:http://mirrors.aliyun.com/ubuntu/dists/ 该网页显示了阿里云支持的ubuntu系统下各个Codename版本,确保本身的Codename在该网页中存在(通常都会有的)ionic
cd /etc/apt sudo mv sources.list sources.list_bak
sudo vi sources.list阿里云
并添加如下内容:注意,每一行的trusty应该用第一步查看获得的Codename来代替rest
deb http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe
sudo apt-get update,code