Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deal with: ImportError: /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0: undefined symbol: g_log_structured_standard

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?

like image 450
daniel_hck Avatar asked May 04 '18 14:05

daniel_hck


1 Answers

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?

like image 125
Liso Avatar answered Nov 16 '22 03:11

Liso