在ubuntu上编译和交叉编译OpenSSL库

在ubuntu上编译OpenSSL库

在OpenSSL官方网站下载openssl的1.0.1f版本:https://www.openssl.org/source/。

编译安装OpenSSL动态链接库

  $ tar zxvf openssl-1.0.1f.tar.gz
  $ cd openssl-1.0.1f
  $ ./config --prefix=/usr/local/openssl shared
  $ make
  $ sudo make install

设置运行时动态链接库加载路径

  $ cp /usr/local/openssl/lib/lib*.so /usr/lib
  $ ldconfig

在ubuntu上交叉编译OpenSSL库

OpenSSL库交叉编译(Linux上动态链接库的编译可见:Shared libraries with GCC on Linux  http://www.cprogramming.com/tutorial/shared-libraries-linux-gcc.html)

  $ tar zxvf openssl-1.0.1f.tar.gz
  $ cd openssl-1.0.1f
  $ export cross=/opt/dvsdk/dvsdk_ipnctools/linux-devkit/bin/arm-arago-linux-gnueabi-
  $ ./Configure dist --prefix=/usr/local/openssl_arm  linux-armv5tej shared
  $ make CC="${cross}gcc" AR="${cross}ar r" RANLIB="${cross}ranlib"
  $ sudo make install

参考:

openssl在arm下的交叉编译 

http://www.cnblogs.com/weifuqin530/archive/2008/11/29/1343826.html

Cross Compile OpenSSH for arm 

http://stackoverflow.com/questions/11841919/cross-compile-openssh-for-arm

openssl certificate verification - different behaviour on build and target systems (does not work properly on ARM) 

http://stackoverflow.com/questions/12322500/openssl-certificate-verification-different-behaviour-on-build-and-target-syste

ARM-Linux 下 openssl 的移植 

http://yiluohuanghun.blog.51cto.com/3407300/1118614

openssl 编译安装 config和Configure 

http://nameyjj.blog.51cto.com/788669/511932

你可能感兴趣的:(在ubuntu上编译和交叉编译OpenSSL库)