ubuntu16.04 重新安装pcl的问题 libpcl-dev : Depends: libvtk6-dev but it is not going to be installed
程序员文章站
2022-06-25 20:45:29
...
环境 Ubuntu16.04 pcl 1.7
0.写在前面
同样是因为安装open3d*卸载了pcl(万恶的open3d)
1.问题
想要安装pcl
sudo apt-get install libpcl-dev
然而事情不是我想的这样
The following packages have unmet dependencies:
libpcl-dev : Depends: libvtk6-dev but it is not going to be installed
Depends: libvtk6-qt-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
继续安装libvtk6-dev又会提示依赖于别的库,一环套一环,如果你去尝试之后会发现最后是包的版本问题,像我这样子,其中一个包.
libfontconfig1-dev : Depends: libfontconfig1 (= 2.11.94-0ubuntu1) but 2.11.94-0ubuntu1.1 is to be installed
我需要一个2.11.94-0ubuntu1的,但是装的却是1.1的.
没错,我们需要降级!
(ps:这样子的问题之前也遇到过,现在写下来作为记录.)
2.解决方案
首选尝试
sudo apt-get install -f libpcl-dev
很遗憾,我没有修复成功,利用aptitude看看?
sudo apt-get install aptitude
sudo aptitude install libpcl-dev
终端给出了提示
The following packages have unmet dependencies:
libpng16-devtools : Conflicts: libpng12-0-dev which is a virtual package, provided by:
- libpng12-dev, but 1.2.54-1ubuntu1 is to be installed.
Conflicts: libpng12-dev but 1.2.54-1ubuntu1 is to be installed.
Conflicts: libpng3-dev which is a virtual package, provided by:
- libpng12-dev, but 1.2.54-1ubuntu1 is to be installed.
libpng16-dev : Conflicts: libpng12-0-dev which is a virtual package, provided by:
- libpng12-dev, but 1.2.54-1ubuntu1 is to be installed.
Conflicts: libpng12-dev but 1.2.54-1ubuntu1 is to be installed.
Conflicts: libpng3-dev which is a virtual package, provided by:
- libpng12-dev, but 1.2.54-1ubuntu1 is to be installed.
libpng12-dev : Depends: libpng12-0 (= 1.2.54-1ubuntu1) but 1.2.54-1ubuntu1.1 is installed.
libfontconfig1-dev : Depends: libfontconfig1 (= 2.11.94-0ubuntu1) but 2.11.94-0ubuntu1.1 is installed.
libfreetype6-dev : Depends: libfreetype6 (= 2.6.1-0.1ubuntu2) but 2.6.1-0.1ubuntu2.4 is installed.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libfontconfig1-dev [Not Installed]
2) libfreetype6-dev [Not Installed]
3) libgdal-dev [Not Installed]
4) libpcl-dev [Not Installed]
5) libpng12-dev [Not Installed]
6) libvtk6-dev [Not Installed]
7) libvtk6-qt-dev [Not Installed]
8) libxft-dev [Not Installed]
9) tk-dev [Not Installed]
10) tk8.6-dev [Not Installed]
Accept this solution? [Y/n/q/?]
我们需不需要保持现在的版本,你给我Not Installed?(之前我举的例子libfontconfig1就在其中)
当然选择n了.
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Remove the following packages:
1) libpng16-dev
2) libpng16-devtools
Downgrade the following packages:
3) fontconfig-config [2.11.94-0ubuntu1.1 (now) -> 2.11.94-0ubuntu1 (xenial)]
4) libfontconfig1 [2.11.94-0ubuntu1.1 (now) -> 2.11.94-0ubuntu1 (xenial)]
5) libfreetype6 [2.6.1-0.1ubuntu2.4 (now) -> 2.6.1-0.1ubuntu2 (xenial)]
6) libpng12-0 [1.2.54-1ubuntu1.1 (now) -> 1.2.54-1ubuntu1 (xenial)]
Accept this solution? [Y/n/q/?]
我们选择y
可以看到一些包可以被降级以满足安装pcl的需要,比如libfontconfig1
到此结束!
下一篇: 百度浏览器怎么下载安装百度识图?