简体   繁体   中英

Make error in OPENCV installation

I was trying to install opencv in linux mint. I run the cmake command in the opencv folder.

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

But i get the some errors related to pango while running make command in the release folder :

//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重新启动虚拟环境

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM