Essentially, trying to write the following code results in the error below:
from matplotlib import pyplot as plt
plt.plot([1,2,3,2,1])
plt.show()
libGL error: MESA-LOADER: failed to open iris: /home/xxx/.conda/envs/stat/lib/python3.8/site-packages/pandas/_libs/window/../../../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib64/dri/iris_dri.so) (search paths /usr/lib64/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /home/xxx/.conda/envs/stat/lib/python3.8/site-packages/pandas/_libs/window/../../../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib64/dri/swrast_dri.so) (search paths /usr/lib64/dri, suffix _dri)
libGL error: failed to load driver: swrast
I found similar errors on StackOverflow but none were what is needed here.
The solution proposed by Mahyar Mirrashed is working for me. On my system (Ubuntu 22.04) the libstdc++.so.6 file is located in /usr/lib/x86_64-linux-gnu/libstdc++.so.6 To know where to find this file I suggest to run the following command :
find / -name libstdc++.so.6 2>/dev/null
which resulted with files from miniconda, snap and /usr/lib/... I added the export LD_PRELOAD to my .bashrc file and it's working fine.
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With