【问题标题】:cp: cannot stat `shtool': No such file or directorycp: 无法统计 `shtool': 没有这样的文件或目录
【发布时间】:2015-02-24 10:52:25
【问题描述】:

在我的网络服务器上,我需要使用 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 && make

我遇到了这个错误:

PHP API 版本:20090626 Zend 模块 API 编号:20090626 Zend Extension API 编号: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。 如何解决我的问题?

【问题讨论】:

  • 文件/usr/local/src/ssh2-0.11.0/build/shtool是否存在?如果是,它是可执行的吗?

标签: php apache zend-framework debian


【解决方案1】:

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

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

这将使用 phpseclib 模拟 libssh2 函数。

【讨论】:

    猜你喜欢
    • 2022-07-06
    • 2021-12-27
    • 2016-04-11
    • 2017-11-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-09-30
    • 2018-02-10
    相关资源
    最近更新 更多