cp:不能统计`shtool':没有这样的文件或目录

时间:2015-02-24 10:52:26

标签: php apache zend-framework debian

在我的网络服务器上,我需要使用ssh2。我试过安装libssh2-1,libssh2-1-dev和libssh2-php,然后重新启动Apache2没什么变化,我在使用ssh2_connect函数时遇到了同样的错误。

为了解决我的问题,我尝试使用PECL安装ssh2(来自本教程:http://lindev.fr/?post/2009/01/19/Installer-le-module-SSH2-pour-php),但是当我启动此命令时:

  

phpize&& ./configure --with-ssh2&&使

我有这个错误:

  

PHP Api版本:20090626   Zend Module Api No:20090626   Zend Extension Api No:220090626   cp:无法统计shtool': No such file or directory chmod: cannot access / usr / local / src / ssh2-0.11.0 / build / shtool':没有这样的文件或目录   '/usr/local/src/ssh2-0.11.0/build/shtool'中的shtool不存在或不可执行。   确保该文件存在且可执行,然后重新运行此脚本。

有关信息,我使用的是PHP5.3。 如何解决我的问题?

1 个答案:

答案 0 :(得分:1)

我的建议:使用phpseclib, a pure PHP SSH2 implementation。如果您需要libssh2函数来支持使用它们的遗留代码,您可以使用:

https://github.com/phpseclib/libssh2-compatibility-layer

使用phpseclib模拟libssh2函数。

相关问题