linux - OPENCV安装报错

标签 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

最佳答案

你需要使用 $ mkvirtualenv cv -p python2 启动虚拟环境

关于linux - OPENCV安装报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46936204/

相关文章:

linux - 在 Linux 中仅列出包含字符串的文件名

c++ - 如何在 OpenCV 中获取网络摄像头 fps 速率?

ruby - Highgui 和 ruby

c# - 有没有办法从 C++ 程序编译和执行 C# 代码?

linux - 如何提取文件名?

mysql - 无法从 CLI MySQL Linux 客户端访问 AWS RDS MySQL 数据库;在 Navicat 上运行良好

linux - 无法使用 linux 连接到防火墙代理后面的 svn

Python-OpenCV 查找矩形并裁剪图像

python - OpenCV evaluateFeatureDetector for Python?

image - 使用 OpenCV 2 进行背景减除