Skip to main content

ubuntu常见问题及解决方案

配置源

编辑sources.list文件
vim /etc/apt/sources.list
注意

一定要备份此文件

替换源

deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

## Not recommended
# deb https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
提示

如果系统中没有vim或者vi,并且安装起来非常的慢,那就建议使用以下方式添加:

# 清除内容
'' > /etc/apt/sources.list

#然后 一条一条的追加上去
echo 'deb https://mirXXXXXX' >> /etc/apt/sources.list
最后执行
apt-get update
如果遇到

InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC

执行以下命令
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC