问题描述
目前,我使用下面的命令从openssl包编译openssl 1.0.2f:
$ tar xzf openssl-1.0。 2e.tar.gz
$ cd openssl-1.0.2e
$ export PREFIX = {PREFIX}
$。/配置-DOPENSSL_NO_HEARTBEATS --openssldir = $ PREFIX共享os /编译器:$ { TARGET}
$ make
这是Beaglebone Black的架构
$ uname -a
$ Linux beaglebone 3.8.13-bone70#1 SMP Fri Jan 23 02:15:42 UTC 2015 armv7l GNU / Linux
我还尝试从列表中设置TARGET:
- linux-armv7l || linux-aarch64 || linux-alpha + bwx-ccc || linux-alpha + bwx-gcc ||
linux-alpha-ccc || linux-alpha-gcc || linux-aout || linux-armv4 || linux-elf || 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返回:
make [1]:{TARGET}:命令未找到
还尝试设置:
os / compiler:gcc
gcc版本:
$ gcc --version
gcc Debian 4.9.2-10)4.9.2
但是当make openssl返回:
/ bin / sh:1:./pod2mantest:权限被拒绝
安装man1 / CA.pl.1
sh:1:--section = 1:未找到
Makefile:634:目标install_docs的配方失败
make:*** [install_docs]错误127
你能告诉我这里有什么问题吗?
我相信你想要 linux-armv4
目标。
$ ./Configure LIST | grep -i arm
android-armeabi
linux-arm64ilp32
linux-armv4
另请参阅OpenSSL维基上的。
它最容易遵循Leśny的建议,并运行 ./ config
。 config
试图猜测目标。如果猜测错误,请使用 ./配置
与三元组:
$ 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
):
code> $ ./config shared no-ssl2 no-ssl3 no-comp -DOPENSSL_NO_HEARTBEATS
操作系统:armv7l-whatever-linux2
配置linux-armv4
no-comp [选项] 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 [实验] OPENSSL_NO_JPAKE dir)
no-krb5 [krb5-flavor未指定] OPENSSL_NO_KRB5
无libunbound [实验] OPENSSL_NO_LIBUNBOUND(跳过目录)
无md2 [默认] OPENS SL_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)
无存储[实验] OPENSSL_NO_STORE(skip dir)
无单位测试[默认] OPENSSL_NO_UNIT_TEST(跳过目录)
无弱-Ssl-ciphers [默认] OPENSSL_NO_WEAK_SSL_CIPHERS(skip dir)
no-zlib [default]
no-zlib-dynamic [default]
...
您可能需要回退到这样的位置:
$。/配置linux-armv4共享no-ssl2 no-ssl3 no-comp -DOPENSSL_NO_HEARTBEATS
...
$ make depend
...
$ make clean
...
$ make
为了完整,我使用的是一个BeagleBone Black,使用从2015年12月(我需要小的2GB足迹,所以存储可用于其他的东西):
$ uname -a
Linux beaglebone 4.1.15-ti-rt-r40#1 SMP PREEMPT RT Thu 1月7日23:32:08 UTC 2016 armv7l GNU / Linux
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
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-elf || 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
But when make openssl, it return:
make[1]: {TARGET}: Command not found
I also try set:
os/compiler:gcc
gcc version:
$ gcc --version
gcc (Debian 4.9.2-10) 4.9.2
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?
I believe you want the linux-armv4
target.
$ ./Configure LIST | grep -i arm
android-armeabi
linux-arm64ilp32
linux-armv4
Also see Compilation and Installation on the OpenSSL wiki.
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
And then (notice 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
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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!