How to deal with: ImportError: /usr/lib/x86_64-lin

2020-06-12 04:14发布

I have a MacBook Pro on which I installed VirtualBox, installed Anaconda (from https://www.continuum.io), and installed OpenCV (conda install -c menpo opencv)

Executed Python:

python
Python 2.7.14 |Anaconda, Inc.| (default, Dec  7 2017, 17:05:42) 
[GCC 7.2.0] on linux2

and tried to import OpenCV:

>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0: undefined symbol: g_log_structured_standard

I Googled the error, but there are not many entries about that, and the ones I found were unsolved. I do not understand even what is the error about, so no clue how to solve it. I have installed Anaconda and OpenCV many times on other systems without problems.

Any idea how to solve this error?

2条回答
Evening l夕情丶
2楼-- · 2020-06-12 04:32

yeah,i check that,update the lib is ok. use the commend conda install -c anaconda glib

查看更多
放我归山
3楼-- · 2020-06-12 04:42

In Ubuntu 18.04 it seems that problem is opposite to what @VamsidharReddyGaddam was supposing.

I checked: grep -l g_log_structured_standard /usr/lib/x86_64-linux-gnu/*glib*.so* # and grep -l g_log_structured_standard ~/anaconda3/lib/*glib*so*

and first find was successful and second not.

I suppose that /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 is compiled/linked against newer libglib (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1 on ubuntu 18.04) than which one is installed by anaconda (~/anaconda3/lib/libglib-2.0.so.0.5306.0 in this moment).

So different dirty hack could "help":

mv ~/anaconda3/lib/libglib-2.0.so.0 ~/anaconda3/lib/libglib-2.0.so.0.backup

in Ubuntu 18.04. :/ (I am suspicious that it could bring different problems later!!!)

How could we fill issue at anaconda?

查看更多
登录 后发表回答