【问题标题】:Fatal error: Uncaught Error: Call to undefined function ssh2_connect() in Ubuntu 18.4致命错误:未捕获错误:在 Ubuntu 18.4 中调用未定义函数 ssh2_connect()
【发布时间】:2021-03-11 00:05:21
【问题描述】:

嘿,这里我正在尝试运行一个 php 代码来连接 SSH,我正在使用 phpseclib,但我在这里面临一个非常令人沮丧的情况。

$connection_string = ssh2_connect('xyz', 22);

【问题讨论】:

标签: php ssh


【解决方案1】:

检查documentation 并尝试以下命令:

1. sudo apt install php-pear
2. sudo pecl channel-update pecl.php.net
3. sudo sudo apt install phpуourversion-dev
4. sudo pecl install ssh2 

希望能帮到你。

【讨论】:

  • 不适合我。
猜你喜欢
  • 1970-01-01
  • 2019-05-22
  • 2017-01-27
  • 2016-04-07
  • 2017-08-19
  • 2018-01-18
相关资源
最近更新 更多