本人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
但是要谨慎,因为更新后可能就把显卡驱动更新了,导致进不去界面
如果进不去界面就看下一篇博文:
版权声明:本文为u010733679原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。