• 好好学习,天天向上~
  • 欢迎欢迎~

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

杂谈 lcc 348℃ 0评论

今天在我的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

提示找不到“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,发现一切正常了。


ubuntu编译opencv时遇到libharfbuzz.so.0: undefined reference to `FT_Reference_Face’错误 - 刘冲的博客(https://blog.popkx.com) 原创版权所有,转载请注明出处。
点赞 (1)分享 (0)
发表我的评论
取消评论
表情     4 + 9 = ? (必填)