Linux上安裝Libssh2


由於項目需要使用libssh2,在安裝時,遇到一些問題,發現網上的都是互相抄,把自己遇到的問題,記下來,希望可以幫助到別人,自己下次使用時候,也方便查找,節約時間。
安裝的流程:

  • 這時候會出現一個問題:configure:error: cannot find OpenSSL or Libgcrypt。。。。。。。
    網上搜了下都是讓你使用./configure --prefix=/data/users/mooon/third-party/libssh2 CPPFLAGS="-I/data/users/mooon/third-party/openssl/include"LDFLAGS="-L/data/users/mooon/third-party/openssl/lib"
    但是,這樣還是不行。。。。
  • 正確的做法是:apt-get install libssh2-1-dev libssh2-php(centos上好像是yum install libssh2-devel)
  • 這時候再configure就沒有這個問題了。

  • 然后再make 和 make install 。就會安裝成功


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM