OpenSSL Error - Node / Python - Error relocating - symbol not found

Hi,

I'm fairly new to OpenWrt and I'm getting the following error when trying to use OpenSSL in Python.

Any help or guidance you can provide would be greatly appreciated.

root@HEATERMETER:~# python

Python 2.7.15 (default, Oct 23 2018, 13:57:51) 

[GCC 7.3.0] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import ssl

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/lib/python2.7/ssl.py", line 98, in <module>
ImportError: Error relocating /usr/lib/python2.7/lib-dynload/_ssl.so: SSL_CTX_set_next_proto_select_cb: symbol not found

The following packages have been installed from (http://downloads.lede-project.org/snapshots/packages/arm_arm1176jzf-s_vfp/packages/)

  • python - 2.7.15-1

  • python-asn1crypto - 0.24.0-1

  • python-base - 2.7.15-1

  • python-cffi - 1.11.5-1

  • python-codecs - 2.7.15-1

  • python-compiler - 2.7.15-1

  • python-cryptography - 2.3.1-1

  • python-ctypes - 2.7.15-1

  • python-db - 2.7.15-1

  • python-decimal - 2.7.15-1

  • python-distutils - 2.7.15-1

  • python-email - 2.7.15-1

  • python-enum34 - 1.1.6-3

  • python-gdbm - 2.7.15-1

  • python-idna - 2.7-1

  • python-ipaddress - 1.0.22-1

  • python-light - 2.7.15-1

  • python-logging - 2.7.15-1

  • python-multiprocessing - 2.7.15-1

  • python-ncurses - 2.7.15-1

  • python-openssl - 2.7.15-1

  • python-ply - 3.11-1

  • python-pycparser - 2.18-2

  • python-pydoc - 2.7.15-1

  • python-pyopenssl - 18.0.0-1

  • python-six - 1.11.0-2

  • python-sqlite3 - 2.7.15-1

  • python-unittest - 2.7.15-1

  • python-xml - 2.7.15-1

UPDATE: I've also encountered a very similar issue when running node.

Seems like there is a deeper SSL issue - any help would be much appreciated.

root@LEDE:~# node
Error relocating /usr/bin/node: SSL_CTX_set_next_protos_advertised_cb: symbol not found
Error relocating /usr/bin/node: SSL_CTX_set_next_proto_select_cb: symbol not found
Error relocating /usr/bin/node: SSL_get0_next_proto_negotiated: symbol not found
root@LEDE:~# ldd /usr/bin/node
/lib/ld-musl-armhf.so.1 (0x7f636000)
libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb6f90000)
libcrypto.so.1.0.0 =&gt; /usr/lib/libcrypto.so.1.0.0 (0xb6e63000)
libssl.so.1.0.0 =&gt; /usr/lib/libssl.so.1.0.0 (0xb6e10000)
libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0xb6d07000)
libgcc_s.so.1 =&gt; /lib/libgcc_s.so.1 (0xb6ced000)
libc.so =&gt; /lib/ld-musl-armhf.so.1 (0x7f636000)
Error relocating /usr/bin/node: SSL_CTX_set_next_protos_advertised_cb: symbol not found
Error relocating /usr/bin/node: SSL_CTX_set_next_proto_select_cb: symbol not found
Error relocating /usr/bin/node: SSL_get0_next_proto_negotiated: symbol not found
root@LEDE:~# ldd /usr/lib/python2.7/lib-dynload/_ssl.so
  ldd (0x7f62b000) 
  libssl.so.1.0.0 =&gt; /usr/lib/libssl.so.1.0.0 (0xb6f1f000)
  libcrypto.so.1.0.0 =&gt; /usr/lib/libcrypto.so.1.0.0 (0xb6df2000)
  libpython2.7.so.1.0 =&gt; /usr/lib/libpython2.7.so.1.0 (0xb6c82000)
  libgcc_s.so.1 =&gt; /lib/libgcc_s.so.1 (0xb6c68000)
  libc.so =&gt; ldd (0x7f62b000)
  libz.so.1 =&gt; /usr/lib/libz.so.1 (0xb6c46000)

Error relocating /usr/lib/python2.7/lib-dynload/_ssl.so: SSL_CTX_set_next_proto_select_cb: symbol not found

Error relocating /usr/lib/python2.7/lib-dynload/_ssl.so: SSL_CTX_set_next_protos_advertised_cb: symbol not found

Error relocating /usr/lib/python2.7/lib-dynload/_ssl.so: SSL_get0_next_proto_negotiated: symbol not found

Solved - library mismatch.

Upgrading libopenssl fixed the issue.
opkg upgrade libopenssl

This pointed me in the direction.... https://bugs.openwrt.org/index.php?do=details&task_id=1205

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.