乐趣区

ubuntu源文件打不开could not open file ‘/etc/apt/sources.list.d/…

问题描述:
WARNING:root:could not open file ‘/etc/apt/sources.list.d/sources-aliyun-0.list’
解决方案:
1. 将 /etc/apt/sources.list 与 /etc/apt/sources.list.d/sources-aliyun-0.list 复制一份副本
2. 将这两个原文件内容更换为以下内容, 并保存退出
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ – Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
3.
sudo apt-get updatesudo apt-get upgrade
至此 问题解决小编遇到了这个问题 查了很多资料 都没能得到有效的解决后来将这两个源文件里的内容改成一致 发现问题才得到解决如果解决不了 还请多多见谅 继续查查其他方法毕竟造成问题的原因不一样 解决方案也会有所差异祝你好运!!

退出移动版