libssh2编译错误(configure error: cannot find OpenSSL or Libgcrypt)解决方法
来源:互联网 发布:网络爬虫需要什么软件 编辑:程序博客网 时间:2024/05/22 06:59
如果按标准的configure执行:
./configure --prefix=/data/users/mooon/third-party/libssh2 --with-openssl --with-libssl-prefix=/data/users/mooon/third-party/openssl --without-libgcrypt-prefix
得到如下错误时:
checking for shared library run path origin... done
checking for libssl... no
checking for libgcrypt... no
configure: error: cannot find OpenSSL or Libgcrypt,
try --with-libssl-prefix=PATH or --with-libgcrypt-prefix=PATH
请改成如下:
./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"
上述方法为何可以解决问题:
./configure --prefix=/data/users/mooon/third-party/libssh2 --with-openssl --with-libssl-prefix=/data/users/mooon/third-party/openssl --without-libgcrypt-prefix
得到如下错误时:
checking for shared library run path origin... done
checking for libssl... no
checking for libgcrypt... no
configure: error: cannot find OpenSSL or Libgcrypt,
try --with-libssl-prefix=PATH or --with-libgcrypt-prefix=PATH
请改成如下:
./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"
上述方法为何可以解决问题:
道理非常简单,就是满足它的需求,报的是找不到OpenSSL,既然--with-libssl-prefix没生效,那么就直接通过CPPFLAGS和LDFLAGS来指定,当执行“./configure --help”可以看到这个支持的。甚至可以通过查看config.log日志文件来了解这方面的信息,以后遇到类似的问题,都可以采取类似的办法,软的不行来硬的。
遇到这个错误的一个重要原因是:OpenSSL没有安装在标准的目录下,如果以./configure不带--prefix安装OpenSSL,则可能不会出现这个问题。
- libssh2编译错误(configure error: cannot find OpenSSL or Libgcrypt)解决方法
- 解决php编译报错configure: error: Cannot find OpenSSL's <evp.h>
- ./configure时,error: cannot find install-sh, install.sh, or shtool解决方法
- configure: error: Cannot find OpenSSL's <evp.h>
- configure: error: Cannot find OpenSSL's <evp.h>
- PHP编译报错configure: error: Cannot find libmysqlclient under 解决方法
- QT编译错误 error: cannot find -lGL
- 安装php7提示 configure: error: Cannot find OpenSSL's libraries 解决方案
- Linux_ubuntu环境下Qt无法编译代码显示-1: error: cannot find -lGL错误的解决方法
- OpenSSL+zlib+libssh2编译(windows)
- libxml2,openssl,libssh2交叉编译
- configure: error: Cannot find ijs-config; please ensure Ghostscript 6.53 or above is installed
- configure编译时,出现 configure: error: C compiler cannot create executables错误解决
- configure: error: Cannot find ldap.h
- configure: error: Cannot find the WebServer
- 解决configure: error: Cannot find the WebServer
- configure: error: Cannot find ldap.h
- configure: error: Cannot find the WebServer
- 戴尔电脑不能装XP的解决方法
- 手动控制IIS服务的开启与关闭
- 基于API的录音机程序(转)
- 自定义Android标题栏TitleBar
- int 和 String 互相转换的多种方法
- libssh2编译错误(configure error: cannot find OpenSSL or Libgcrypt)解决方法
- volatile与指针
- Java运算符优先级及结合性与C语言之比较
- android 学习教程五---- 四大组件之一Activity 详解
- requestWindowFeature()的应用
- Linux 设备驱动
- 批处理
- 指针与引用
- MCI和波形(转)