こんなエラーが出た場合
Traceback (most recent call last):
File "/usr/local/lib64/python3.8/site-packages/MySQLdb/__init__.py", line 18, in <module>
from . import _mysql
ImportError: /lib64/libstdc++.so.6: cannot allocate memory in static TLS block
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "xxxx.py", line 15, in <module>
import MySQLdb
File "/usr/local/lib64/python3.8/site-packages/MySQLdb/__init__.py", line 24, in <module>
version_info, _mysql.version_info, _mysql.__file__
NameError: name '_mysql' is not defined
対応の1つ
/etc/profile に記述
export LD_PRELOAD=/lib64/libstdc++.so.6