如何在 Beaglebone Black 上编译 openssl 1.0.2f? [英] How to compile openssl 1.0.2f on Beaglebone Black?
问题描述
目前,我使用以下命令从 openssl 包编译 openssl 1.0.2f:
Currently, I use command below to compile openssl 1.0.2f from openssl package:
$ tar xzf openssl-1.0.2e.tar.gz
$ cd openssl-1.0.2e
$export PREFIX={PREFIX}
$./Configure -DOPENSSL_NO_HEARTBEATS --openssldir=$PREFIX shared os/compiler:${TARGET}
$ make
这是 Beaglebone Black 的架构
This is architecture of Beaglebone Black
$uname -a
$Linux beaglebone 3.8.13-bone70 #1 SMP Fri Jan 23 02:15:42 UTC 2015 armv7l GNU/Linux
我也尝试从列表中设置目标:
I also try to set TARGET from list:
- linux-armv7l ||linux-aarch64 ||linux-alpha+bwx-ccc ||linux-alpha+bwx-gcc||linux-alpha-ccc ||linux-alpha-gcc ||linux-aout ||linux-armv4 ||linux精灵||linux-generic32 ||linux-generic64 ||linux-ia32-icc ||linux-ia64 ||linux-ia64-icc ||linux-mips32 ||linux-mips64 ||linux-ppc ||linux-ppc64 ||linux-ppc64le||linux-sparcv8 ||linux-sparcv9 ||linux-x32 ||linux-x86_64 ||linux-x86_64-clang ||linux-x86_64-icc ||linux32-s390x ||linux64-mips64 ||linux64-s390x ||linux64-sparcv9
但是当 make openssl 时,它会返回:
But when make openssl, it return:
make[1]: {TARGET}: Command not found
我也尝试设置:
os/compiler:gcc
gcc 版本:
$ gcc --version
gcc (Debian 4.9.2-10) 4.9.2
但是当 make openssl 时,它会返回:
But when make openssl, it return:
/bin/sh: 1: ./pod2mantest: Permission denied
installing man1/CA.pl.1
sh: 1: --section=1: not found
Makefile:634: recipe for target 'install_docs' failed
make: *** [install_docs] Error 127
你能告诉我这里出了什么问题吗?
Could you tell me what is wrong here?
推荐答案
如何在 Beaglebone Black 上编译 openssl 1.0.2f?
How to compile openssl 1.0.2f on Beaglebone Black?
我相信你想要 linux-armv4
目标.
I believe you want the linux-armv4
target.
$ ./Configure LIST | grep -i arm
android-armeabi
linux-arm64ilp32
linux-armv4
另请参阅 OpenSSL wiki 上的 编译和安装.
Also see Compilation and Installation on the OpenSSL wiki.
听从 Leśny 的建议并运行 ./config
可能是最简单的.config
尝试猜测目标.如果猜错了,那么使用 ./Configure
和三元组:
Its probably easiest to follow Leśny's advice and run ./config
. config
tries to guess at the target. If the guess is wrong, then use ./Configure
with the triplet:
$ wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz
...
$ tar xzf openssl-1.0.2g.tar.gz
...
$ cd openssl-1.0.2g
然后(注意linux-armv4
):
$ ./config shared no-ssl2 no-ssl3 no-comp -DOPENSSL_NO_HEARTBEATS
Operating system: armv7l-whatever-linux2
Configuring for linux-armv4
no-comp [option] OPENSSL_NO_COMP (skip dir)
no-ec_nistp_64_gcc_128 [default] OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)
no-gmp [default] OPENSSL_NO_GMP (skip dir)
no-jpake [experimental] OPENSSL_NO_JPAKE (skip dir)
no-krb5 [krb5-flavor not specified] OPENSSL_NO_KRB5
no-libunbound [experimental] OPENSSL_NO_LIBUNBOUND (skip dir)
no-md2 [default] OPENSSL_NO_MD2 (skip dir)
no-rc5 [default] OPENSSL_NO_RC5 (skip dir)
no-rfc3779 [default] OPENSSL_NO_RFC3779 (skip dir)
no-sctp [default] OPENSSL_NO_SCTP (skip dir)
no-ssl-trace [default] OPENSSL_NO_SSL_TRACE (skip dir)
no-ssl2 [option] OPENSSL_NO_SSL2 (skip dir)
no-ssl3 [option] OPENSSL_NO_SSL3 (skip dir)
no-store [experimental] OPENSSL_NO_STORE (skip dir)
no-unit-test [default] OPENSSL_NO_UNIT_TEST (skip dir)
no-weak-ssl-ciphers [default] OPENSSL_NO_WEAK_SSL_CIPHERS (skip dir)
no-zlib [default]
no-zlib-dynamic [default]
...
<小时>
你可能需要回退到这样的事情:
You may need to fallback to something like this:
$./Configure linux-armv4 shared no-ssl2 no-ssl3 no-comp -DOPENSSL_NO_HEARTBEATS
...
$ make depend
...
$ make clean
...
$ make
<小时>
为了完整起见,我从 2015 年 12 月开始使用 Debian 控制台映像在 BeagleBone Black 上工作(我需要2GB 的小空间,因此存储空间可用于其他用途):
For completeness, I was working from a BeagleBone Black using a Debian console image from December, 2015 (I needed the small, 2GB footprint so storage was available for other things):
$ uname -a
Linux beaglebone 4.1.15-ti-rt-r40 #1 SMP PREEMPT RT Thu Jan 7 23:32:08 UTC 2016 armv7l GNU/Linux
这篇关于如何在 Beaglebone Black 上编译 openssl 1.0.2f?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!