1.错误描述:
// A code block
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
2.解决办法:
使用命令 lsb_release -a 查询自己系统的版本号
我自己的是16
sudo gedit /etc/apt/sources.list
把文件中原来的内容先备份,
再把该文件原来内容删除,把下面的内容复制过去
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
执行命令,更新系统资源列表
sudo apt-get update
sudo apt-get upgrade
问题解决。
补充:
apt-get install报错: Package ‘xxx‘ has no installation candidate
也可以用上面的方法解决。
执行更新过程可能会有点慢,大概5min-10min,耐心等待。