简体   繁体   English

如何处理:ImportError: /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0: undefined symbol: g_log_structured_standard

[英]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 )我有一台 MacBook Pro,在上面安装了 VirtualBox,安装了 Anaconda(来自https://www.continuum.io ),并安装了 OpenCV( conda install -c menpo opencv

Executed Python:执行的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:并尝试导入 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.我已经在其他系统上多次安装了 Anaconda 和 OpenCV,没有出现问题。

Any idea how to solve this error?知道如何解决这个错误吗?

yeah,i check that,update the lib is ok.是的,我检查了一下,更新库没问题。 use the commend conda install -c anaconda glib使用命令conda install -c anaconda glib

In Ubuntu 18.04 it seems that problem is opposite to what @VamsidharReddyGaddam was supposing.在 Ubuntu 18.04 中,问题似乎与 @VamsidharReddyGaddam 假设的相反。

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*我检查了: 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.第一次find成功,第二次没有。

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).我想/usr/lib/x86_64-linux-gnu/libatk-1.0.so.0是针对较新的libglib ( /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5600.1 on ubuntu 18.04) 而不是由 anaconda 安装的(此时为~/anaconda3/lib/libglib-2.0.so.0.5306.0 )。

So different dirty hack could "help":所以不同的肮脏黑客可以“帮助”:

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

in Ubuntu 18.04.在 Ubuntu 18.04 中。 :/ (I am suspicious that it could bring different problems later!!!) :/(我怀疑它以后会带来不同的问题!!!)

How could we fill issue at anaconda?我们如何在 anaconda 上填写 issue?

For me, I realized my anaconda was running on python3.7 and the python program it was referring to was in the anaconda folder, I switched to system wide python interpreter running version 3.9 and it worked for me.对我来说,我意识到我的 anaconda 在 python3.7 上运行,它所指的 python 程序在 anaconda 文件夹中,我切换到运行 3.9 版的系统范围的 python 解释器,它对我有用。 See if it works for your too.看看它是否也适合你。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 获取 ImportError /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version &#39;CXXABI_1.3.11&#39; not found - Getting ImportError /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'CXXABI_1.3.11' not found vim:符号查找错误:/lib/x86_64-linux-gnu/libpython3.8.so.1.0:未定义符号:XML_SetHashSalt - vim: symbol lookup error: /lib/x86_64-linux-gnu/libpython3.8.so.1.0: undefined symbol: XML_SetHashSalt /usr/lib/x86_64-linux-gnu/libstdc++.so.6: 找不到 TensorFlow 需要的版本“GLIBCXX_3.4.21” - /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found required by TensorFlow Python3:导入错误:/lib/x86_64-linux-gnu/libQt5Core.so.5:未找到版本“Qt_5.15” - Python3: ImportError: /lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.15' not found Python在ldconfig -p确实找到的/ usr / lib / x86_64-linux-gnu中找不到库 - Python not finding library in /usr/lib/x86_64-linux-gnu that ldconfig -p does find 加载 Python lib '/tmp/_MEItueAuk/libpython3.7m.so.1.0' 时出错:dlopen: /lib/x86_64-linux-gnu/libc.so.6: 找不到版本 'GLIBC_2.28' - Error loading Python lib '/tmp/_MEItueAuk/libpython3.7m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found ImportError with _event.cpython-310-x86_64-linux-gnu.so:未定义符号:_PyGen_Send - ImportError with _event.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send 运行 python azure 函数应用程序时遇到错误:ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29&#39; not found - Facing error while running python azure function app: ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found 无法导入 PyTorch/XLA 以在 CoLab 中使用 TPU 并出现 ImportError:/lib/x86_64-linux-gnu/libc.so.6:找不到版本“GLIBC_2.28” - Cannot import PyTorch/XLA for using TPU in CoLab with ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found /lib/x86_64-linux-gnu/libm.so.6:找不到版本“GLIBC_2.29”(/usr/local/lib/python3.7/dist-packages/pyexiv2/lib/libexiv2.so 需要)colab粘性物 - /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/local/lib/python3.7/dist-packages/pyexiv2/lib/libexiv2.so) colab goo
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM