为 PHP 安装 PECL SSH2 扩展 [英] Install PECL SSH2 extension for PHP

查看:43
本文介绍了为 PHP 安装 PECL SSH2 扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装这个http://fr2.php.net/manual/en/book.ssh2.php在 Centos 5(RHEL 5 的一个分支)上.

I am trying to install this http://fr2.php.net/manual/en/book.ssh2.php on a Centos 5 (a fork of RHEL 5).

我安装了位于/usr/lib 中的 libssh2(yum install libssh2),当我安装 SSH2 扩展(通过 pecl install -f ssh2)时,我收到此消息

I installed libssh2 (yum install libssh2) which is located in /usr/lib, and when I install SSH2 extension (via pecl install -f ssh2) I get this message

正在检查默认路径中的 ssh2 文件...未找到配置:错误:找不到所需的 libssh2 库.您可以从 http://sourceforge.net/projects/libssh2/ 获取该包错误:`/tmp/pear/download/ssh2-0.11.0/configure --with-ssh2=/usr' 失败

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,我会得到同样的信息

If I set /usr/lib, I get the same message

错误:`/tmp/pear/download/ssh2-0.11.0/configure --with-ssh2=/usr/lib' 失败

ERROR: `/tmp/pear/download/ssh2-0.11.0/configure --with-ssh2=/usr/lib' failed

问题出在哪里?

推荐答案

通过 tar.gz 安装 libssh2 来自 http://sourceforge.net/projects/libssh2/ 帮助很大(--with-ssh2=/usr/local/include/).

Installing libssh2 via tar.gz from http://sourceforge.net/projects/libssh2/ help a lot (--with-ssh2=/usr/local/include/).

但是yum install libssh2-devel"是一个更好的主意.

But "yum install libssh2-devel" is a better idea.

这篇关于为 PHP 安装 PECL SSH2 扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆