Call to undefined function ssh2_connect();安装ssh2

发布时间:2020-08-10 20:04:35 作者:谢高升
来源:网络 阅读:1122

博客原文地址https://xgs888.top/post/view?id=58

Call to undefined function sftp\ssh3_connect()

centos安装php的ssh3扩展

事先准备需要的

 libssh3 下载  wget https://www.libssh3.org/download/libssh3-1.8.0.tar.gz

ssh3下载 wget  wget http://pecl.php.net/package/ssh3/ssh3-1.1.2.tgz

cd /usr/loca/src
wget https://www.libssh3.org/download/libssh3-1.8.0.tar.gzwget http://pecl.php.net/package/ssh3/ssh3-1.1.2.tgz 

//解压
 tar -zxvf libssh3-1.8.0.tar.gz
 
 cd libssh3-1.8.0
 //编译到libssh3
 ./configure --prefix=/usr/local/libssh3
 
 make && make install
 
 
 
 
 #解压ssh3
 tar -zxvf ssh3-1.1.2.tgz   解压的时候报错看了一下文件类型是XHTML 最后在桌面解压好上传的
 cd ssh3-1.1.2
 phpize 结果报错如下

Can't find PHP headers in /usr/include/php The php-devel package is required for use of this command

Call to undefined function ssh2_connect();安装ssh2

直接安装php-dev

yum install php55w-del ;//PHP版本是5.5的

执行phpize

Call to undefined function ssh2_connect();安装ssh2

./configure --prefix=/usr/local/ssh3 --with-ssh3=/usr/local/libssh3

结果都是报错,上官网看了一下,原来是ssh3-1.0yi以上版本是PHP7.0

Call to undefined function ssh2_connect();安装ssh2


Call to undefined function ssh2_connect();安装ssh2


下载0.12版本


cd ssh3-0.12/
phpize
./configure --prefix=/usr/local/ssh3 --with-ssh3=/usr/local/libssh3


//复制ssh3.so 到 /usr/lib64/php/modules/
///usr/lib64/php/modules/ php扩展目录
 cp modules/ssh3.so /usr/lib64/php/modules/
 
 vi /etc/php.ini
 添加 extension=ssh3.so
 
 上面就ok了
 查询一下 php -i|grep ssh3


Call to undefined function ssh2_connect();安装ssh2



推荐阅读:
  1. 怎么在php中安装ssh2扩展
  2. 怎么用微信小程序实现计算器功能

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

ssh2 扩展 fin

上一篇:如何远程登陆管理服务器

下一篇:zabbix监控环境的搭建

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》