openssl版本号是openssl-1.0.0.tar.gz
交叉编译器版本:arm-gk720x-linux-uclibcgnueabi-
1.解压
tar xvf open-1.0.0.tar.gz
2.进入openssl目录
cd openssl-1.0.0
3.创建安装目录
mkdir _install (该目录名自定,交叉编译器后面有横杠(-))
4.配置
./config no-asm shared no-async --prefix=$PWD/_install --cross-compile-prefix=arm-gk720x-linux-uclibcgnueabi-
5.修改Makefile文件,删除-m64 和-m32
6.编译
make
7.安装
make install
8.检查
在_install目录生成bin include lib64 ssl目录,lib64文件夹并不是64位才有,我后面测试发现编译32位软件也需要指定该目录
说明:
1、本次安装目录是当前路径下的_install
2、no-async 是因为arm-gk720x-linux-uclibcgnueabi-gcc没有提供GNU C的ucontext库
3、–prefix指定安装路径
4、–cross-compile-prefix指定交叉工具链
5、make之前可以坚持Makefile文件,删除 -m64 -m32
5、编译器有32位和64位之分
异常处理
如果在linux下安装openssl,执行config和make之后,在执行make install时如果出现下面的错误
cms.pod around line 457: Expected text after =item, not a number
cms.pod around line 461: Expected text after =item, not a number
cms.pod around line 465: Expected text after =item, not a number
cms.pod around line 470: Expected text after =item, not a number
cms.pod around line 474: Expected text after =item, not a number
POD document had syntax errors at /usr/bin/pod2man line 69.
则在root权限下,执行rm -f /usr/bin/pod2man 然后重新make install