2

I'm running Ubuntu (18.04) via docker: https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/

When I try to import OpenCV (4.6.0) in Blender (3.2.2) via Python (3.10.5), I get the following error:

ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /root/blender/3.2/python/lib/python3.10/site-packages/../../libopencv_gapi.so.406)

However, if I import cv2 in python console outside of Blender I don't get any error. The OpenCV works just fine.

What I have tried

I followed: https://github.com/lhelontra/tensorflow-on-arm/issues/13

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get upgrade libstdc++6

This updated libraries, however I still don't have GLIBCXX_3.4.30 listed.

(base) root@4f1142ba2414:~# strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBCXX_DEBUG_MESSAGE_LENGTH

GLIBCXX_3.4.29 is not listed even here: https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html

It seems that similar problem occured with tensorflow, pytorch etc. and that the previous approach helped:

libstdc++.so.6: version `GLIBCXX_3.4.20' not found

setting LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/:/root/miniconda3/lib did not helped either: libstdc++.so.6: version `GLIBCXX_3.4.20' not found

Possible workaround

If you have any idea how to run the newest Blender on server so that I won't have to resolve conflicting dependencies with other packages. Please comment.

Erik Hulmák
  • 133
  • 1
  • 7

1 Answers1

0

I had the exact same issue with a conda environment running on the Windows WSL default Ubuntu version.

The issue was solved only after upgrading to a newer Ubuntu version.

Editing the file

/etc/update-manager/release-upgrades

change the line to Prompt=lts and run

do-release-upgrade -d
epifanio
  • 1,228
  • 1
  • 16
  • 26