2

I tried to find out which version of some things i installed on my Jetson Nano. So I wrote a few lines of code and run it in python3 by using a terminal.

And by doing the error shown in the picture occured. In another topic I found out that you can avoid some errors by changing the order of your import. That worked for me but obviously something does not work properly.

Maybe this could become a big problem if there is a program with many lines of code. I can't image that this error can always be fixed by changing the order of import.

Are there ways to prevent this error?

ImportError: /usr/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block

Someone has a good advice and can help.

Thanks. Chris

Community
  • 1
  • 1
chrisTopp
  • 71
  • 2
  • 2
  • 7

2 Answers2

6

Just add the library path in your bashrc file

export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1:/$LD_PRELOAD

Source bashrc and it should solve the problem on aarch64 devices

SnakeEyezszz
  • 61
  • 1
  • 1
  • 1
    above command has a slight problem '/' after => export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1:$LD_PRELOAD – init-22 Dec 06 '22 at 09:26
5

if you preload the library it works correctly - like this

LD_PRELOAD=libgomp.so.1 python3 your_python_script

this is the link to bugzilla entry - apparently the issue is in glibc https://bugzilla.redhat.com/show_bug.cgi?id=1722181

Eugene
  • 101
  • 1
  • 6