手機 - Motorola XT897 - CM 11 - Debian - 解決Python requires a OpenSSL 1.1.1 or newer問題



參考資訊:
https://community.opalstack.com/d/1016-failed-to-install-python-3106-with-user-installed-openssl/5

問題如下:

*** WARNING: renaming "_ssl" since importing it failed: libssl.so.3: cannot open shared object file: No such file or directory
*** WARNING: renaming "_hashlib" since importing it failed: libcrypto.so.3: cannot open shared object file: No such file or directory

The necessary bits to build these optional modules were not found:
_tkinter              _uuid                                    
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Following modules built successfully but were removed because they could not be imported:
_hashlib              _ssl                                     


Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
Custom linker flags may require --with-openssl-rpath=auto

running build_scripts
creating build/scripts-3.11

解法如下:

$ export LDFLAGS="-L/usr/local/lib"
$ export CPPFLAGS="-I/usr/local/include"
$ ./configure --with-openssl=/usr/local/ --with-openssl-rpath=auto