linux(ubuntu)源碼編譯安裝openssl__linux

來源:互聯網
上載者:User

ubuntu-16.04.3(32位)

openssl-1.0.2k

步驟:

1、卸載系統中原有openssl

sudo apt-get remove openssl

2、解壓openssl壓縮包(進入壓縮包所在目錄,解壓)壓縮包所在目錄可任意

tar -xzf openssl-1.0.2k.tar.gz(解壓到目前的目錄)

3、進入解壓後的檔案夾,進行以下操作

./config

make

make test

make install(sudo su 獲得root許可權後執行該指令)

完成


成功執行上述指令後,在執行指令的根目錄下(解壓後的檔案夾),有名為libcrypto.a 和 libssl.a的庫檔案,在apps子目錄中,有openssl可執行程式。

進入apps子目錄,運行指令  ./openssl  ,出現OpenSSL>   則安裝成功。



運行程式error: openssl/opensslv.h: No such file or directory。

sudo apt-get install libssl-dev


編譯c語言源檔案

gcc rsatest.c -o hello-lssl -lcrypto



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.