14

ubuntu编译opencv时遇到libharfbuzz.so.0: undefined reference to `FT_Reference_Fac...

 3 years ago
source link: https://blog.popkx.com/ubuntu%E7%BC%96%E8%AF%91opencv%E6%97%B6%E9%81%87%E5%88%B0libharfbuzz-so-0-undefined-reference-to-ft_reference_face%E9%94%99%E8%AF%AF/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

ubuntu编译opencv时遇到libharfbuzz.so.0: undefined reference to `FT_Reference_Face'错误

发表于 2019-06-05 17:06:28   |   已被 访问: 1,471 次   |   分类于:   杂谈   |   暂无评论

今天在我的ubuntu16.04上编译opencv-3.4.* 时,发现如下错误:

//usr/lib/i386-linux-gnu/libharfbuzz.so.0: undefined reference to `FT_Reference_Face'
collect2: error: ld returned 1 exit status
modules/highgui/CMakeFiles/opencv_test_highgui.dir/build.make:104: recipe for target 'bin/opencv_test_highgui' failed
make[2]: *** [bin/opencv_test_highgui] Error 1
CMakeFiles/Makefile2:4937: 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:162: recipe for target 'all' failed
make: *** [all] Error 2
b28372a36e5d1d6565d17c77977fc03e.png

提示找不到“FT_Reference_Face”,谷歌之,发现它是 freetype 库的内容。因此怀疑我的 freetype 版本较旧,于是下载 freetype-2.10.0.tar,输入以下命令安装:

# tar xf freetype-2.10.0.tar
# cd freetype-2.10.0
# mkdir build
# cd build
# ../configure --prefix=/usr/local
# make
...
# make install

然后再编译 opencv,发现一切正常了。

阅读更多:   杂谈


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK