subscribe to our Youtube


14455 questions

17168 answers


0 members

We are migrating to our new platform at Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
+3 votes
1,222 views 27 comments
by anonymous
Hi, everyone

I have installed Python 3.7 on a TRB140 using 'opkg install python3-light'. The installation completed succesfully. When I run 'python3' or execute a python-script then the following error appears:

Error relocating /usr/lib/ getrandom: symbol not found

I have no working resolution. Can anybody help?

Regards, Mike
by anonymous
firmware version V7.01 seems to have fixed this issue by updating the base openwrt to 21.02

please check


by anonymous
Yes, the latest firmware V7.02 is openwrt 21.02 based and Python is working. Thanks!

by anonymous
Newest firmware did not fix this issue

1 Answer

0 votes
by anonymous

Could you please check if other opkg packages work normally and are installed correctly?

Check if you have the latest firmware version? Try resetting the router to default factory settings?

If you're able to install others and use them and only a little part of packages return with errors like that - I'm afraid there's nothing we can do, as this is a third-party package and it's not included in our base functionality.

Your best bet would be waiting for a newer firmware version as it should include a little newer OpenWRT update.

by anonymous
1 - looks like you have a SDK version already containing a getrandom.c file, so the patch is not required. Which version do you use ? What is the content of the original file ?

2) extract the source in the base directory and make menuconfig to enable it, copy to the target device and use it as LD_PRELOAD=./ python3 ...
by anonymous
I'm using the latest SDK available from Teltonika, so TRB1_R_00.07.01.2

I cannot find the file in the SDK, do I have to check for it during runtime on the target device?

Regarding 2): With base directory you mean the base directory of the sdk or the target device? Sorry for asking these possibly trivial questions but I'm new to building firmwares with the SDK.
by anonymous
Just checked, getrandom.c is in build_dir/toolchain-mips_24kc_gcc-8.4.0_musl/musl-1.1.24/src/linux. It is downloaded so it appears only after a make. The 902-xxx pacth is redondant, don't use it in this version (and delete it if it is present).

2) the folder where it resides, for me rutos-ath79-trb2-gpl
by anonymous
Thank you very much so far. I did not find any options to enable it in the menuconfig menu, can you hint me in the right direction one last time?
by anonymous
It is in the Libraries sub-menu, but you shouldn't need it as getrandom() is included in the musl library in this version.