我正在尝试安装它 http://fr2.php.net/manual/en/book.ssh2.php 在 Centos 5(RHEL 5 的一个分支)上。
我安装了位于/usr/lib 中的 libssh2(yum 安装 libssh2),当我安装 SSH2 扩展(通过 pecl install -f ssh2)时,我收到了这条消息
checking for ssh2 files in default path... not found configure: error: The required libssh2 library was not found. You can obtain that package from http://sourceforge.net/projects/libssh2/ ERROR: `/tmp/pear/download/ssh2-0.11.0/configure --with-ssh2=/usr' failed
如果我设置/usr/lib,我会收到相同的消息
ERROR: `/tmp/pear/download/ssh2-0.11.0/configure --with-ssh2=/usr/lib' failed
问题出在哪里?
最佳答案
通过来自 http://sourceforge.net/projects/libssh2/ 的 tar.gz 安装 libssh2帮助很大(--with-ssh2=/usr/local/include/)。
但是:
yum install libssh2-devel
...是个更好的主意。
关于php - 为 PHP 安装 PECL SSH2 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/561024/