Skip to content
Back

Missing C++ libstdc library in Python function

  • 0
  • Functions
  • Web
  • Cloud
KonurPapa
25 Jun, 2025, 19:09

I have a function running Python 3.12 which suddenly started dumping errors (as of today; it worked yesterday). I hadn't changed any code so I found this odd, but after looking through the error logs, it looks like the issue is a missing C++ library 'libstdc++.so.6' which is required by a library I'm using. My guess is something changed on the Appwrite side of things.

So I need some direction on how to work around this... I've tried downgrading from Python 3.12 to Python 3.9, and creating an entirely new function, but neither changed anything and I don't know whether there's something I can do or if this is entirely on Appwrite's side to fix.

TL;DR
Developer is experiencing errors in Python function due to missing C++ library 'libstdc++.so.6' required by a library being used. Downgrading Python and creating a new function did not resolve the issue. It might be related to changes on the Appwrite side. Possible workaround could be manually installing the missing library in the required path.
KonurPapa
25 Jun, 2025, 19:09

Here's the full error log for context:

TypeScript
Traceback (most recent call last):
  File "/usr/local/server/src/server.py", line 106, in action
    output = await asyncio.wait_for(execute(context), timeout=safeTimeout)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/usr/local/server/src/server.py", line 91, in execute
    userModule = importlib.import_module("function." + userPath)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/local/server/src/function/src/main.py", line 11, in <module>
    import pymupdf as fitz
  File "/usr/local/server/src/function/runtime-env/lib/python3.12/site-packages/pymupdf/__init__.py", line 30, in <module>
    from . import extra
  File "/usr/local/server/src/function/runtime-env/lib/python3.12/site-packages/pymupdf/extra.py", line 10, in <module>
    from . import _extra
ImportError: Error loading shared library libstdc++.so.6: No such file or directory (needed by /usr/local/server/src/function/runtime-env/lib/python3.12/site-packages/pymupdf/_extra.so)```
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more