本人ubuntu16.04, 在配置caffe的时候使用apt-get命令后提示
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
4.sudo apt-get update
解决。
如何还没解决再执行
sudo apt-get upgrade
但是要谨慎,因为更新后可能就把显卡驱动更新了,导致进不去界面。
如果进不去界面请继续,由于配置cuda,经常出现安装cuda后,或者更新系统后重启进不去桌面的现象。解决方案如下:
1.下载显卡对应驱动,拷到u盘,最好是系统home主目录
2.启动桌面命令行
ctrl +alt +F1
如果进不去命令行,估计只能重装了,最好是重装后先看一下能这个命令能不能进去命令行。
3.关闭桌面服务
sudo service lightdm stop
4.sudo chmod 775 /path/to/显卡驱动.run
5.sudo /patn/to/显卡驱动.run
6.按照提示一步一步执行就好了