When trying to install the extension ssh2 via pecl, I encounter the below error messages. I was using a docker container based on php:7.3.2-fpm
Steps to reproduce:
- Install PHP 7.3.2
- Install the packages
libssh2-1-dev
andlibssh2-1
- Try to install the ssh2 extension via
pecl install ssh2-1.1.2
So how can I successfully install the ssh2
extension?
...
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c: In function 'php_ssh2_fopen_wrapper_tunnel':
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:1265:42: error: invalid operands to binary == (have 'zend_string {aka struct _zend_string}' and 'int')
if (resource->path && resource->path[0] == '/') {
~~~~~~~~~~~~~~~~~ ^~
/tmp/pear/temp/ssh2/ssh2_fopen_wrappers.c:1268:8: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
host = resource->path + 1;
^
Makefile:196: recipe for target 'ssh2_fopen_wrappers.lo' failed
make: *** [ssh2_fopen_wrappers.lo] Error 1
ERROR: `make' failed
I found this question unanswered and put on hold on superusers when I first googled for it. I think its more suited here.