I install anaconda2, ros and opencv3.4 in Ubuntu16.04, and when I catkin_make
a ros workspace, there is an error:
/home/zqk/anaconda2/lib/libfontconfig.so.1: undefined reference to 'FT_Done_MM_Var'
.
I've tried many ways to solve, but still cannot solve it.
Can anyone help me? thanks for your help!
I hope I can help you! I solved this!
I met the same problem when I installed pcl1.9.
[ 45%] Linking CXX executable ../bin/pcl_mesh_sampling
/home/ifcoxs/anaconda3/lib/libfontconfig.so.1:对‘FT_Done_MM_Var’未定义的引用 collect2: error: ld returned 1 exit status tools/CMakeFiles/pcl_mesh_sampling.dir/build.make:314: recipe for target 'bin/pcl_mesh_sampling' failed make[2]: * [bin/pcl_mesh_sampling] Error 1 CMakeFiles/Makefile2:3221: recipe for target 'tools/CMakeFiles/pcl_mesh_sampling.dir/all' failed make[1]: * [tools/CMakeFiles/pcl_mesh_sampling.dir/all] Error 2 make[1]: *** 正在等待未完成的任务....
After troubleshooting, I found that this library file is a problem (libfontconfig.so.1).It has two paths and the versions are inconsistent.
/usr/lib/x86_64-linux-gnu$ ll |grep libfontconfig.so.1
lrwxrwxrwx 1 root root 23 4月 6 2018 libfontconfig.so -> libfontconfig.so.1.10.1
lrwxrwxrwx 1 root root 23 5月 31 16:04 libfontconfig.so.1 -> libfontconfig.so.1.10.1
-rw-r--r-- 1 root root 281984 4月 6 2018 libfontconfig.so.1.10.1
~/anaconda3/lib$ ll | grep libfontconfig.so.1
lrwxrwxrwx 1 ifcoxs ifcoxs 23 5月 31 20:17 libfontconfig.so -> libfontconfig.so.1.11.1*
lrwxrwxrwx 1 ifcoxs ifcoxs 23 5月 31 20:17 libfontconfig.so.1 -> libfontconfig.so.1.11.1*
-rwxr-xr-x 1 ifcoxs ifcoxs 324384 5月 31 20:17 libfontconfig.so.1.11.1*
So I do it two steps:
1.
copy the file from /usr/lib/x86_64-linux-gnu to ~/anaconda3/lib
2.
~/anaconda3/lib$ ln -s libfontconfig.so.1.10.1 libfontconfig.so.1
~/anaconda3/lib$ ln -s libfontconfig.so.1.10.1 libfontconfig.so
The final display is as follows:
~/anaconda3/lib$ ll |grep libfontconfig
-rw-r--r-- 1 ifcoxs ifcoxs 494654 5月 31 20:17 libfontconfig.a
-rwxr-xr-x 1 ifcoxs ifcoxs 1252 5月 31 20:17 libfontconfig.la*
lrwxrwxrwx 1 ifcoxs ifcoxs 23 6月 13 21:19 libfontconfig.so -> libfontconfig.so.1.10.1
lrwxrwxrwx 1 ifcoxs ifcoxs 23 6月 13 21:19 libfontconfig.so.1 -> libfontconfig.so.1.10.1
-rw-r--r-- 1 ifcoxs ifcoxs 281984 6月 13 21:17 libfontconfig.so.1.10.1
-rwxr-xr-x 1 ifcoxs ifcoxs 324384 5月 31 20:17 libfontconfig.so.1.11.1*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With