OS: Ubuntu 16.04.2 LTS
OpenSSL Version: openssl-1.1.0e.tar.gz
1. 将下载的软件压缩包存放至系统根目录/
2. 在当前目录下解压文件:
tar -xzf openssl-1.1.0e.tar.gz
3. 切入解压目录:
cd openssl-1.1.0e
4. 配置OpenSSL编译参数:
./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)' (--prefix参数用于指定安装目录)
5. 执行编译操作:
make (无错误进入下一步,若出现错误尝试重新下载安装包配置编译)
6. 执行安装操作:
make install
7. 查看OpenSSL版本、绝对路径及依赖关系
⋊> ~ openssl-1.1.0e/apps/openssl version
OpenSSL 1.1.0e 16 Feb 2017
⋊> ~ ldd openssl-1.1.0e/apps/openssl
linux-vdso.so.1 => (0x00007ffdb2b4a000)
libssl.so.1.1 => /usr/local/lib/libssl.so.1.1 (0x00007efe66347000)
libcrypto.so.1.1 => /usr/local/lib/libcrypto.so.1.1 (0x00007efe65eba000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007efe65c7b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007efe658b2000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007efe656ae000)
/lib64/ld-linux-x86-64.so.2 (0x0000561eb2909000)
⋊> ~ which openssl
/usr/local/bin/openssl
Reference:
http://www.codes51.com/article/detail_4126135.html
https://github.com/openssl/openssl/issues/1740