php - 为 PHP 安装 PECL SSH2 扩展

标签 php ssh

我正在尝试安装它 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/

相关文章:

php - 如何创建唯一的注册号

mysql - Tcl Expect 保持 SSH Spawn 打开

macos - github ssh key 每次都不保存并询问密码

github - 如何从头开始返回并在同一台电脑上配置 gitlab 和 github 帐户?

regex - 通过ssh运行的perl正则表达式命令行

php - 在 Laravel 5.1 中将对象转换为数组

javascript - 完成页面加载后调用 PHP DOM 函数 file_get_html

javascript - 将变量从 AJAX 发送到 PHP 时出错

ssh - Chef : deploy a server with root ssh access disabled?

php - Pear Mail Queue - 日志/记录?