安装libopencv-dev时,提示缺少依赖。
缺少了依赖的包怎么解决呢?
笨方法:那我们就apt-get install 缺少的包名,然后就会发现套娃,加入从第一个包进行安装的时候又会提示缺少另一个包,当场扑街。。。
查找资料的时候发现了aptitude包管理系统。
所以用如下命令:
sudo apt-get install aptitude
sudo aptitude install libopencv-dev
然后会提示如下
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Downgrade the following packages:
Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:
Accept this solution? [Y/n/q/?] y
Do you want to continue? [Y/n/?] y
提示的界面忘记截图了,反正大致就是上面这个意思,大致看一下提示。然后就可以安装成功了。