在OPENCV安装中出错

时间:2017-10-25 15:19:03

标签: linux opencv

我试图在linux mint中安装opencv。我在opencv文件夹中运行cmake命令。

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..

但是我在发布文件夹中运行make命令时得到了与pango相关的一些错误:

//usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to `pango_attr_font_features_new'
//usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to `pango_renderer_set_alpha'
//usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to `pango_layout_get_serial'
//usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to `pango_attr_background_alpha_new'
//usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to `pango_layout_get_log_attrs_readonly'
//usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to `pango_fc_font_map_config_changed'
//usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to `pango_renderer_get_alpha'
//usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined reference to `pango_attr_foreground_alpha_new'
collect2: error: ld returned 1 exit status
modules/highgui/CMakeFiles/opencv_test_highgui.dir/build.make:129: recipe for target 'bin/opencv_test_highgui' failed
make[2]: *** [bin/opencv_test_highgui] Error 1
CMakeFiles/Makefile2:7412: recipe for target 'modules/highgui/CMakeFiles/opencv_test_highgui.dir/all' failed
make[1]: *** [modules/highgui/CMakeFiles/opencv_test_highgui.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

1 个答案:

答案 0 :(得分:0)

您需要使用$ mkvirtualenv cv -p python2进行虚拟环境重启