ubuntu: Unable to correct problems, you have held broken packages 解決方案

本人ubuntu16.04, 在配置caffe的時候使用apt-get命令後提示

<pre name="code" class="plain">Unable to correct problems, you have held broken packages 

網上試了很多方法,比如:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
之類的均不成功。

於是就去更新了源:

1.備份並替換/etc/apt/sources.list的源內容

2.

sudo vi /etc/apt/sources.list
3將以下內容複製到裏面:

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-backports main restricted universe multiverse
##測試版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed 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-backports main restricted universe multiverse
##測試版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main

3.

sudo  apt-get update

解決。

如何還沒解決再執行

sudo apt-get upgrade
但是要謹慎,因爲更新後可能就把顯卡驅動更新了,導致進不去界面

如果進不去界面就看下一篇博文:






發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章