LeoHsiao1 / pyexiv2

Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile.
GNU General Public License v3.0
196 stars 39 forks source link

latest version 2.8.2 doesn't work on Ubuntu 20.04 #120

Closed rdcyuxi closed 9 months ago

rdcyuxi commented 9 months ago

latest version 2.8.2 doesn't work on Ubuntu 20.04, errors as below, glibc is already 2.31, unlike mentioned here: https://github.com/LeoHsiao1/pyexiv2/blob/master/docs/Tutorial.md#faq:

Python 3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyexiv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/yaleyu/.local/lib/python3.8/site-packages/pyexiv2/__init__.py", line 6, in <module>
    from .core import *
  File "/home/yaleyu/.local/lib/python3.8/site-packages/pyexiv2/core.py", line 4, in <module>
    from .lib import exiv2api
  File "/home/yaleyu/.local/lib/python3.8/site-packages/pyexiv2/lib/__init__.py", line 19, in <module>
    ctypes.CDLL(os.path.join(lib_dir, 'libexiv2.so'))
  File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/yaleyu/.local/lib/python3.8/site-packages/pyexiv2/lib/libexiv2.so)

ldd --version returns ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31

works well on Ubuntu 22.04, with ldd (Ubuntu GLIBC 2.35-0ubuntu3) 2.35, default python version is 3.10.

So, it could be glibc version, or python version problem?

LeoHsiao1 commented 9 months ago

Hi! This is because pyexiv2 is compiled with a newer version of GLIBC library. You need to upgrade your GLIBC library, or upgrade your Linux distribution.

rdcyuxi commented 9 months ago

OK, when I googled GLIBCXX_3.4.29, I saw someone meet similar problem with other python packages, this seems to be not unique, I will upgrade my Ubuntu.

LeoHsiao1 commented 9 months ago

Well. glibc is an important base library for linux. If a new version of glibc is used for compilation, then running the software also depends on the new version of glibc.