Python application crash with error “ImportError: pyexpat.x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt”

前端 未结 1 1750
北海茫月
北海茫月 2021-01-28 19:48

We use matlab\'s python engine to interface with matlab code from python. There seems to be some conflict with the used libexpact.so library.

A minimal buggy example wou

相关标签:
1条回答
  • 2021-01-28 20:37

    I faced the same error message this morning and after looking around, I found this solution works for me. So I re-post here. Hope this help in future.

    "It seems that this is caused by library conflicts with libexpat. I did ldd /usr/lib/python2.7/lib-dynload/pyexpat.so and realized that my libexpat.so.1 was pointing to /usr/local/lib/libexpat.so.1 rather than /lib/x86_64-linux-gnu/libexpat.so.1 (the former referencing an outdated version, 1.5.2 instead of 1.6.0). I don't know where the libexpat in /usr/local/lib came from.

    I hide my libexpat files in /usr/local/lib (renamed with .backup appended) and now running ldd /usr/lib/python2.7/lib-dynload/pyexpat.so displays the line "libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1" and update-manager works correctly."

    https://ubuntuforums.org/showthread.php?t=2094005

    0 讨论(0)
提交回复
热议问题