I have a Opal router. On a factory reset router with latest beta fw, I installed python3-light (3.6.5-1) and python3-openssl (3.6.5-1). When trying to add the ssl module to python I get this error msg:
root@GL-SFT1200:~# python3
Python 3.6.5 (default, May 31 2021, 02:50:58)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import ssl
Traceback (most recent call last):
File "", line 1, in
File "/ssl.py", line 101, in
ImportError: Error relocating /root/_ssl.cpython-36.so: COMP_get_type: symbol not found
So I am unable to use any python program which requires ssl. It's also impossibile to install pip which is not provided by any package but it could be installed by downloading some scripts.
I hope it will be fixed in the next update.
Are the deps even installed on the device? Upstream OWRT recently switch to mbedtls
. I'm not sure GCC is relevant here as OWRT now uses musl. That could be related.
opkg list-installed | grep ssl
1 Like
Thanks, here is the output:
root@GL-SFT1200:~# opkg list-installed | grep ssl
libopenssl - 1.1.1i-1
libopenssl-conf - 1.1.1i-1
libustream-openssl - 2018-07-30-23a3f283-1
lua-eco-ssl - 3.7.0-2
nginx-ssl - 1.26.1-1
openssl-util - 1.1.1i-1
openvpn-openssl - 2.5.7-3
python3-openssl - 3.6.5-1
rtty-openssl - 8.0.1-1
wpad-openssl - 2019-08-08-ca8c2bd2-4
Well it all looks good but I don't work in py. You know what I'd do in this case? I'd get the underlying OpenWrt version from cat /etc/os-release
or elsewhere then grab a 'pure' OWRT image from https://firmware-selector.openwrt.org/ before spinning up a VM. That'll quickly identify if there's something missing in GL.iNet default opkg
feeds, a GL conflict is in play or if the package is broken.
1 Like
Thank you for the suggestion. From the research I did, it is possibile that the python openssl library was compiled with a different version of ssl than the one installed on the router. So I would need to recompile it. I could try to do that with the gl-inet sdk but I don't have the expertise.
Honesty I am a little disappointed the package provided with the router is not working.
Yeah, I don't doubt it. py seems to have various builds/interpreters to even run on smaller embedded devices but that's just my general impression. I don't see why it wouldn't run on a GL device given the underlying OWRT.
FWIW I've seen other threads where GL support compiled other packages and put it into their default feeds once it was determined where the issue was. You're not exactly a standard SOHO user, obviously. I'd definitely use a VM somewhere in testing before pushing a release candidate build to your Opal. I'd think that'd quickly help determine any incompatibilities caused by something like GL's SDK or other 'gotcha.'
Also, consider installing full ssh, openssh-server
, on your Opal & VM. Change its default port so it doesn't conflict with dropbear
on :22. OpenSSH would let you set up passwordless/pubkey login to make it easier to push to it when you're ready to test on bare metal. Don't set it on the same port as dropbear
; any future firmware is going to just conflict with it if so & potentially lock you out. I use :2222.
1 Like