Caffe-SSD错误:ImportError: /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0: undefined symbol: g_log_structur

Caffe-SSD编译成功后,在import caffe时候出现以下错误:

>>> import caffe
Traceback (most recent call last):
  File "", line 1, in <module>
  File "/home/dell/Programming/caffe/python/caffe/__init__.py", line 1, in <module>
    from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
  File "/home/dell/Programming/caffe/python/caffe/pycaffe.py", line 13, in <module>
    from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0: undefined symbol: g_log_structured_standard

错误的原因:/usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 被Anaconda中新版本的libglib编译。

  • Ubuntu18.04版本中是:/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1)
  • Anaconda :~/anaconda3/lib/libglib-2.0.so.0.5306.0 in this moment

解决方法:

  • 安装最新版的glib库.
conda install -c anaconda glib
  • 在终端输入:
grep -l g_log_structured_standard /usr/lib/x86_64-linux-gnu/*glib*.so*
grep -l g_log_structured_standard ~/anaconda3/lib/*glib*so*
  • 链接
mv ~/anaconda3/lib/libglib-2.0.so.0 ~/anaconda3/lib/libglib-2.0.so.0.backup

问题解决!

你可能感兴趣的:(Caffe,Linux,Caffe,SSD,Ubuntu18.04,libatk,undefined)