1. 程式人生 > >openssl 編譯安裝

openssl 編譯安裝

官方下載地址:https://www.openssl.org/source/

#解壓
$ tar -zxvf openssl-1.1.0h.tar.gz
$ cd openssl-1.1.0h

#配置(使用sudo是因為要prefix的訪問許可權)
$ sudo ./config --prefix=/usr/local/openssl
該步驟出現如下警告
Configured for darwin-i386-cc.
wanzhihuideMacBook-Pro:openssl-1.1.0h wanzhihui$ sudo ./config --prefix=/usr/local/ --openssldir=/usr/local/openssl darwin64-x86_64-cc
Operating system: i686-apple-darwinDarwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64
WARNING! If you wish to build 64-bit library, then you have to
         invoke './Configure darwin64-x86_64-cc' *manually*.
         You have about 5 seconds to press Ctrl-C to abort.

openssl/config指令碼會根據$KERNEL_BITS來判斷是否開啟x86_64編譯,預設是不開啟的,所以你生成的openssl庫檔案是32位的,最後靜態連結到nginx會出錯。
解決方法:
找到makefile將裡面的PLATFORM=dist改成
PLATFORM=darwin64-x86_64-cc

#配置、編譯和安裝
$ export KERNEL_BITS=64
$ sudo ./config darwin64-x86_64-cc  --prefix=/usr/local/openssl
$ sudo make
$ sudo make install

#檢視版本
$ openssl version


不編譯64位的在安裝nginx時會報連結錯誤:
-L/usr/local/lib -lpcre /usr/local/openssl/lib/libssl.a /usr/local/openssl/lib/libcrypto.a -lz
ld: warning: ignoring file /usr/local/openssl/lib/libssl.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libssl.a
ld: warning: ignoring file /usr/local/openssl/lib/libcrypto.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libcrypto.a
Undefined symbols for architecture x86_64:
  "_ASN1_GENERALIZEDTIME_print", referenced from:
      _ngx_ssl_stapling_ocsp_handler in ngx_event_openssl_stapling.o
  "_ASN1_d2i_bio", referenced from:
      _ngx_ssl_stapling in ngx_event_openssl_stapling.o
  "_BIO_ctrl", referenced from:
      _ngx_ssl_get_raw_certificate in ngx_event_openssl.o
      _ngx_ssl_get_serial_number in ngx_event_openssl.o
      _ngx_ssl_stapling_ocsp_handler in ngx_event_openssl_stapling.o
  "_BIO_free", referenced from:

相關推薦

openssl 編譯安裝

官方下載地址:https://www.openssl.org/source/#解壓$ tar -zxvf openssl-1.1.0h.tar.gz$ cd openssl-1.1.0h#配置(使用sudo是因為要prefix的訪問許可權)$ sudo ./config --

編譯安裝openssl的nginx的方法

openssl nginx http_ssl_module with-openssl1、如果用的是yum裏最新版本的openssl-devel,編譯nginx時候可以用./configure --with-http_ssl_module2、如果openssl是用源碼包升過級的,那編譯時候用./configur

編譯安裝openssl

clu cal fig lib con crypto .org libs ln -s wget https://www.openssl.org/source/openssl-1.1.0g.tar.gztar xf openssl-1.1.0g.tar.gzcd openss

openssl升級1.0.2k及nginx1.14.0編譯安裝

openssl編譯安裝 tar -zxvf openssl-1.0.2l.tar.gz  ./config --prefix=/usr/local/openssl #注意如果有問題,會顯示出來,一般是perl版本問題 make && make install #重

curl 編譯安裝(openssl)

//依賴安裝 yum install openssl openssl-devel wget https://curl.haxx.se/download/curl-7.63.0.tar.gz tar -zvxf curl-7.63.0.tar.gz cd curl-7.63.0 ./c

osx的openssl安裝以及xcode連線編譯

蘋果早在osx 10.7就已經拋棄了openssl,真是牛逼啊,居然在心臟流血之前避開了。 但是openssl的加密還是可以使用的,還是不錯的,最近要做動態加密解密,防止別人盜取密碼和賬號。 好了,入正題:首先下載: 解壓: tar xvzf openssl-1.0

Mac 用shell指令碼編譯安裝openssl for Mac and iOS

Mac shell編譯安裝openssl for Mac and iOS 想做一個ios加密專案,用到openssl,故用指令碼傻瓜式下載、編譯、安裝,shell指令碼改自https://gist.github.com/armadsen/b30f352a8d6

php無需編譯安裝openssl擴充套件

    在php中使用RSA演算法的時候,需要呼叫openssl_get_publickey方法,但同時需要對php編譯openssl擴充套件,否則會提示以下錯誤: Call to undefined function openssl_get_publickey()   

Win10環境下Openssl編譯安裝以及在vs2013上開發環境的搭建

現代密碼學上機作業,即熟悉Openssl的編譯安裝以及開發環境的搭建。本人作業系統為win10,用的是vs2013,。win10、win8兩個系統對於這個安裝沒有出入,所以說本部落格也可指導win8上的操作。開發環境還可以是vc6.0,大致與vs相同,具體百度就行。如下是具

OpenSSL原始碼安裝後路徑配置(解決Nginx編譯openssl not found問題)

有時候因為nginx升級之後使用了高版本的Openssl,本地需要新增新模組重新編譯nginx時候要升級openssl至指定版本。 原始碼安裝Openssl之後重新編譯Nginx會報如下錯誤: checking for OpenSSL library ... not fo

編譯安裝php的openssl元件時遇到 libssl not found解決辦法

centos上編譯安裝完php之後發現沒有安裝openssl元件,於是用phpize 增加openssl 到php原始碼目錄下的ext目錄中,找到openssl目錄 php/bin/phpize ./configure --with-openssl --with-php-c

【Python筆記】原始碼編譯安裝Python時,如何支援自定義安裝的高版本openssl

最近有個小需求想使用Scrapy庫做抓取,但公司開發機作業系統版本老舊,導致系統預設的openssl庫版本也很低(OpenSSL 0.9.7a Feb 19 2003),最終導致安裝Scrapy非常麻煩。趁著元旦假期,決定用自己安裝好的高版本openssl庫作為依賴,重新編

Centos7 編譯安裝 Openssl 1.1.1 支持國密

supported engine 定義 openssl .tar.gz root nss pla ont OpenSSL項目新版本增加了中國SM2/SM3/SM4算法的支持: SM2橢圓曲線: https://github.com/openssl/openssl/pull

ubuntu14.04編譯安裝mysql5.6.28

add memory server 目錄 是否 efault mysql-bin cnblogs adl 一、安裝必備工具sudo apt-get install make bison g++ build-essential libncurses5-dev cmake nc

git安裝 編譯安裝

git一、安裝依賴 yum update -y #可以不做 yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker wget https://github.c

LAMP 編譯安裝

lamp#軟件下載#開源博客Wordpress 下載地址:https://cn.wordpress.org/wordpress-4.7.4-zh_CN.tar.gz#PHP 7 下載地址:http://cn2.php.net/distributions/php-7.1.4.tar.gz#apache

LNMP之編譯安裝PHP出現的問題

grep php 接下來 可能 don 星期 gre 目前 pat 2010年以前,互聯網公司最常用的Web服務組合就是LAMP(即Linux、Apache、MySQL、PHP),近幾年隨著Nginx Web服務的逐漸流行,又出現了新的Web服務環境組合--LNMP

CentOS 5.9裸機編譯安裝搭建LAMP

現在 local 搭建lamp redhat compile ins upd amp package Linux系統:CentOS 5.9,查看CentOS版本,命令如下: [[email protected]/* */ /]# cat /etc/

在CentOS 7上源碼編譯安裝MySQL 5.7

mysql source cmake 1.系統環境[[email protected]/* */ ~]# uname -r3.10.0-514.el7.x86_64 [[email protected]/* */ ~]# cat /etc/redhat-release

apache編譯安裝參數說明

top gre modules apach dbm 哪些 lib usr -h apache編譯安裝參數說明 ./configure //配置源代碼樹--prefix=/usr/local/apache2 //體系無關文件的頂級安裝目錄prefix ,也就apache的安裝