OpenSSL

Python3.8.0のコンパイルにOpenSSL 1.0.2 以上が必要らしい。
でも、Debian openssl で検索すると、
パッケージ: openssl (1.0.1t-1+deb8u12) [security]
なので、openSSLのダウンロードページからダウンロードしてビルド。

参考:LinuxにApacheとOpenSSLをソースからビルドしてインストールする

$ wget https://www.openssl.org/source/openssl-1.0.2t.tar.gz
$ tar xvzf openssl-1.0.2t.tar.gz
・・・
$ cd openssl-1.0.2t
$ sudo ./config --prefix=/usr/local/openssl-1.0.2t shared zlib
・・・
Configured for linux-armv4.
$ sudo make
・・・
$ sudo make install
penSSL shared libraries have been installed in:
  /usr/local/openssl-1.0.2t
If this directory is not in a standard system path for dynamic/shared
libraries, then you will have problems linking and executing
applications that use OpenSSL libraries UNLESS:
* you link with static (archive) libraries.  If you are truly
  paranoid about security, you should use static libraries.
* you use the GNU libtool code during linking
  (http://www.gnu.org/software/libtool/libtool.html)
* you use pkg-config during linking (this requires that
  PKG_CONFIG_PATH includes the path to the OpenSSL shared
  library directory), and make use of -R or -rpath.
  (http://www.freedesktop.org/software/pkgconfig/)
* you specify the system-wide link path via a command such
  as crle(1) on Solaris systems.
* you add the OpenSSL shared library directory to /etc/ld.so.conf
  and run ldconfig(8) on Linux systems.
* you define the LD_LIBRARY_PATH, LIBPATH, SHLIB_PATH (HP),
  DYLD_LIBRARY_PATH (MacOS X) or PATH (Cygwin and DJGPP)
  environment variable and add the OpenSSL shared library
  directory to it.
One common tool to check the dynamic dependencies of an executable
or dynamic library is ldd(1) on most UNIX systems.
See any operating system documentation and manpages about shared
libraries for your version of UNIX.  The following manpages may be
helpful: ld(1), ld.so(1), ld.so.1(1) [Solaris], dld.sl(1) [HP],
ldd(1), crle(1) [Solaris], pldd(1) [Solaris], ldconfig(8) [Linux],
chatr(1) [HP].
・・・
$ ldd /usr/local/openssl-1.0.2t/bin/openssl
        linux-vdso.so.1 (0xbee33000)
        libssl.so.1.0.0 => /usr/local/openssl-1.0.2t/lib/libssl.so.1.0.0 (0xb6f0d000)
        libcrypto.so.1.0.0 => /usr/local/openssl-1.0.2t/lib/libcrypto.so.1.0.0 (0xb6d7b000)
        libdl.so.2 => /lib/arm-linux-gnueabi/libdl.so.2 (0xb6d68000)
        libz.so.1 => /lib/arm-linux-gnueabi/libz.so.1 (0xb6d40000)
        libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6bf7000)
        /lib/ld-linux.so.3 (0xb6f72000)
$ vi /etc/ld.so.conf.d/arm-openssl-1.0.2t.conf
a
# openssl-1.0.2t
/usr/local/openssl-1.0.2t/lib
$ sudo ldconfig

共有ライブラリィのパスに登録
あれれ?名前が1.0.0じゃないか???
Pythonは1.0.2以上がががとエラる。
諦めて最新の安定版ver1.1.1dを試す。

$ wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
$ tar xvzf openssl-1.1.1d.tar.gz
…
$ sudo ./config --prefix=/usr/local/openssl-1.1.1d shared zlib
Operating system: armv7l-whatever-linux2
Configuring OpenSSL version 1.1.1d (0x1010104fL) for linux-armv4
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile
**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
$ sudo make
…
$ sudo make install
…
$ ldd /usr/local/openssl-1.1.1d/bin/openssl
        linux-vdso.so.1 (0xbeade000)
        libssl.so.1.1 => not found
        libcrypto.so.1.1 => not found
        libz.so.1 => /lib/arm-linux-gnueabi/libz.so.1 (0xb6f6c000)
        libdl.so.2 => /lib/arm-linux-gnueabi/libdl.so.2 (0xb6f59000)
        libpthread.so.0 => /lib/arm-linux-gnueabi/libpthread.so.0 (0xb6f30000)
        libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6de7000)
        /lib/ld-linux.so.3 (0xb6f94000)
$ vi /etc/ld.so.conf.d/arm-openssl-1.1.1d.conf
a
# openssl-1.1.1d.
/usr/local/openssl-1.1.1d/lib
$ sudo ldconfig




コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA