本人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.
3將以下內容複製到裏面:sudo vi /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-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
如果進不去界面就看下一篇博文: