SSH2の拡張モジュールをインストールしたいのですが、makeでエラーになります。

TOP Forums その他(Everything else KUSANAGI) SSH2の拡張モジュールをインストールしたいのですが、makeでエラーになります。

SSH2の拡張モジュールをインストールしたいのですが、makeでエラーになります。

Viewing 0 reply threads
  • Author
    Posts
    • #553
      stagehand
      Participant

      https://column.prime-strategy.co.jp/archives/column_2191
      こちらの手順で ssh2モジュールをインストールしたいのですが、makeを実行するとエラーとなり make install へ進めません。
      なにか解決策などありますでしょうか。

      【サーバ環境】
      KUSANAGI Version 8.4.2-2
      CentOS Linux release 7.6.1810

      【エラーメッセージ】
      # make
      /bin/sh /usr/local/src/ssh2-1.1.2/libtool –mode=compile cc -I. -I/usr/local/src/ssh2-1.1.2 -DPHP_ATOM_INC -I/usr/local/src/ssh2-1.1.2/include -I/usr/local/src/ssh2-1.1.2/main -I/usr/local/src/ssh2-1.1.2 -I/usr/local/php7/include/php -I/usr/local/php7/include/php/main -I/usr/local/php7/include/php/TSRM -I/usr/local/php7/include/php/Zend -I/usr/local/php7/include/php/ext -I/usr/local/php7/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/ssh2-1.1.2/ssh2.c -o ssh2.lo
      mkdir .libs
      cc -I. -I/usr/local/src/ssh2-1.1.2 -DPHP_ATOM_INC -I/usr/local/src/ssh2-1.1.2/include -I/usr/local/src/ssh2-1.1.2/main -I/usr/local/src/ssh2-1.1.2 -I/usr/local/php7/include/php -I/usr/local/php7/include/php/main -I/usr/local/php7/include/php/TSRM -I/usr/local/php7/include/php/Zend -I/usr/local/php7/include/php/ext -I/usr/local/php7/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/ssh2-1.1.2/ssh2.c -fPIC -DPIC -o .libs/ssh2.o
      /bin/sh /usr/local/src/ssh2-1.1.2/libtool –mode=compile cc -I. -I/usr/local/src/ssh2-1.1.2 -DPHP_ATOM_INC -I/usr/local/src/ssh2-1.1.2/include -I/usr/local/src/ssh2-1.1.2/main -I/usr/local/src/ssh2-1.1.2 -I/usr/local/php7/include/php -I/usr/local/php7/include/php/main -I/usr/local/php7/include/php/TSRM -I/usr/local/php7/include/php/Zend -I/usr/local/php7/include/php/ext -I/usr/local/php7/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c -o ssh2_fopen_wrappers.lo
      cc -I. -I/usr/local/src/ssh2-1.1.2 -DPHP_ATOM_INC -I/usr/local/src/ssh2-1.1.2/include -I/usr/local/src/ssh2-1.1.2/main -I/usr/local/src/ssh2-1.1.2 -I/usr/local/php7/include/php -I/usr/local/php7/include/php/main -I/usr/local/php7/include/php/TSRM -I/usr/local/php7/include/php/Zend -I/usr/local/php7/include/php/ext -I/usr/local/php7/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c -fPIC -DPIC -o .libs/ssh2_fopen_wrappers.o
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c: 関数 ‘php_ssh2_fopen_wraper_parse_path’ 内:
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 警告: 互換性のないポインタ型から 1 番目の ‘strlen’ の引数に渡しています [デフォルトで有効]
      if (strncmp(resource->scheme, “ssh2.”, sizeof(“ssh2.”) – 1)) {
      ^
      In file included from /usr/local/php7/include/php/main/../main/php_config.h:2616:0,
      from /usr/local/php7/include/php/Zend/zend_config.h:1,
      from /usr/local/php7/include/php/Zend/zend_portability.h:43,
      from /usr/local/php7/include/php/Zend/zend_types.h:25,
      from /usr/local/php7/include/php/Zend/zend.h:27,
      from /usr/local/php7/include/php/main/php.h:33,
      from /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:25:
      /usr/include/string.h:395:15: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      extern size_t strlen (const char *__s)
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 警告: 互換性のないポインタ型から 1 番目の ‘strlen’ の引数に渡しています [デフォルトで有効]
      if (strncmp(resource->scheme, “ssh2.”, sizeof(“ssh2.”) – 1)) {
      ^
      In file included from /usr/local/php7/include/php/main/../main/php_config.h:2616:0,
      from /usr/local/php7/include/php/Zend/zend_config.h:1,
      from /usr/local/php7/include/php/Zend/zend_portability.h:43,
      from /usr/local/php7/include/php/Zend/zend_types.h:25,
      from /usr/local/php7/include/php/Zend/zend.h:27,
      from /usr/local/php7/include/php/main/php.h:33,
      from /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:25:
      /usr/include/string.h:395:15: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      extern size_t strlen (const char *__s)
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 警告: 互換性のないポインタ型から 1 番目の ‘__builtin_strcmp’ の引数に渡しています [デフォルトで有効]
      if (strncmp(resource->scheme, “ssh2.”, sizeof(“ssh2.”) – 1)) {
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 警告: 互換性のないポインタ型から 1 番目の ‘strlen’ の引数に渡しています [デフォルトで有効]
      In file included from /usr/local/php7/include/php/main/../main/php_config.h:2616:0,
      from /usr/local/php7/include/php/Zend/zend_config.h:1,
      from /usr/local/php7/include/php/Zend/zend_portability.h:43,
      from /usr/local/php7/include/php/Zend/zend_types.h:25,
      from /usr/local/php7/include/php/Zend/zend.h:27,
      from /usr/local/php7/include/php/main/php.h:33,
      from /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:25:
      /usr/include/string.h:395:15: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      extern size_t strlen (const char *__s)
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 警告: 互換性のないポインタ型から 1 番目の ‘__builtin_strcmp’ の引数に渡しています [デフォルトで有効]
      if (strncmp(resource->scheme, “ssh2.”, sizeof(“ssh2.”) – 1)) {
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 警告: 互換性のないポインタ型から 1 番目の ‘__builtin_strcmp’ の引数に渡しています [デフォルトで有効]
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 警告: 互換性のないポインタ型から 1 番目の ‘__builtin_strcmp’ の引数に渡しています [デフォルトで有効]
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:236:2: 警告: 互換性のないポインタ型から 1 番目の ‘strncmp’ の引数に渡しています [デフォルトで有効]
      In file included from /usr/local/php7/include/php/main/../main/php_config.h:2616:0,
      from /usr/local/php7/include/php/Zend/zend_config.h:1,
      from /usr/local/php7/include/php/Zend/zend_portability.h:43,
      from /usr/local/php7/include/php/Zend/zend_types.h:25,
      from /usr/local/php7/include/php/Zend/zend.h:27,
      from /usr/local/php7/include/php/main/php.h:33,
      from /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:25:
      /usr/include/string.h:143:12: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      extern int strncmp (const char *__s1, const char *__s2, size_t __n)
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:242:2: 警告: 互換性のないポインタ型から 1 番目の ‘strlen’ の引数に渡しています [デフォルトで有効]
      if (strcmp(resource->scheme + sizeof(“ssh2.”) – 1, type)) {
      ^
      In file included from /usr/local/php7/include/php/main/../main/php_config.h:2616:0,
      from /usr/local/php7/include/php/Zend/zend_config.h:1,
      from /usr/local/php7/include/php/Zend/zend_portability.h:43,
      from /usr/local/php7/include/php/Zend/zend_types.h:25,
      from /usr/local/php7/include/php/Zend/zend.h:27,
      from /usr/local/php7/include/php/main/php.h:33,
      from /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:25:
      /usr/include/string.h:395:15: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      extern size_t strlen (const char *__s)
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:242:2: 警告: 互換性のないポインタ型から 1 番目の ‘__builtin_strcmp’ の引数に渡しています [デフォルトで有効]
      if (strcmp(resource->scheme + sizeof(“ssh2.”) – 1, type)) {
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:242:2: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:242:2: 警告: 互換性のないポインタ型から 1 番目の ‘strlen’ の引数に渡しています [デフォルトで有効]
      In file included from /usr/local/php7/include/php/main/../main/php_config.h:2616:0,
      from /usr/local/php7/include/php/Zend/zend_config.h:1,
      from /usr/local/php7/include/php/Zend/zend_portability.h:43,
      from /usr/local/php7/include/php/Zend/zend_types.h:25,
      from /usr/local/php7/include/php/Zend/zend.h:27,
      from /usr/local/php7/include/php/main/php.h:33,
      from /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:25:
      /usr/include/string.h:395:15: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      extern size_t strlen (const char *__s)
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:242:2: 警告: 互換性のないポインタ型から 1 番目の ‘__builtin_strcmp’ の引数に渡しています [デフォルトで有効]
      if (strcmp(resource->scheme + sizeof(“ssh2.”) – 1, type)) {
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:242:2: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:242:2: 警告: 互換性のないポインタ型から 1 番目の ‘__builtin_strcmp’ の引数に渡しています [デフォルトで有効]
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:242:2: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:242:2: 警告: 互換性のないポインタ型から 1 番目の ‘__builtin_strcmp’ の引数に渡しています [デフォルトで有効]
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:242:2: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:256:4: 警告: 互換性のないポインタ型からの代入です [デフォルトで有効]
      s = resource->path;
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:257:2: 警告: 互換性のないポインタ型から 2 番目の ‘strstr’ の引数に渡しています [デフォルトで有効]
      resource->path = estrdup(strstr(path, resource->path));
      ^
      In file included from /usr/local/php7/include/php/main/../main/php_config.h:2616:0,
      from /usr/local/php7/include/php/Zend/zend_config.h:1,
      from /usr/local/php7/include/php/Zend/zend_portability.h:43,
      from /usr/local/php7/include/php/Zend/zend_types.h:25,
      from /usr/local/php7/include/php/Zend/zend.h:27,
      from /usr/local/php7/include/php/main/php.h:33,
      from /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:25:
      /usr/include/string.h:338:14: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      extern char *strstr (const char *__haystack, const char *__needle)
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:257:17: 警告: 互換性のないポインタ型からの代入です [デフォルトで有効]
      resource->path = estrdup(strstr(path, resource->path));
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:261:4: 警告: 互換性のないポインタ型からの代入です [デフォルトで有効]
      s = resource->host;
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:312:24: エラー: 二項演算子 == への無効な被演算子です (‘zend_string’ と int’)
      if (resource->host[0] == 0 && context && psftp &&
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:326:24: エラー: 二項演算子 == への無効な被演算子です (‘zend_string’ と int’)
      if (resource->host[0] == 0 && context &&
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:402:3: 警告: 互換性のないポインタ型から 1 番目の ‘strlen’ の引数に渡しています [デフォルトで有効]
      int len = strlen(resource->user);
      ^
      In file included from /usr/local/php7/include/php/main/../main/php_config.h:2616:0,
      from /usr/local/php7/include/php/Zend/zend_config.h:1,
      from /usr/local/php7/include/php/Zend/zend_portability.h:43,
      from /usr/local/php7/include/php/Zend/zend_types.h:25,
      from /usr/local/php7/include/php/Zend/zend.h:27,
      from /usr/local/php7/include/php/main/php.h:33,
      from /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:25:
      /usr/include/string.h:395:15: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      extern size_t strlen (const char *__s)
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:405:13: 警告: 互換性のないポインタ型からの代入です [デフォルトで有効]
      username = resource->user;
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:411:3: 警告: 互換性のないポインタ型から 1 番目の ‘strlen’ の引数に渡しています [デフォルトで有効]
      int len = strlen(resource->pass);
      ^
      In file included from /usr/local/php7/include/php/main/../main/php_config.h:2616:0,
      from /usr/local/php7/include/php/Zend/zend_config.h:1,
      from /usr/local/php7/include/php/Zend/zend_portability.h:43,
      from /usr/local/php7/include/php/Zend/zend_types.h:25,
      from /usr/local/php7/include/php/Zend/zend.h:27,
      from /usr/local/php7/include/php/main/php.h:33,
      from /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:25:
      /usr/include/string.h:395:15: 備考: expected ‘const char *’ but argument is of type ‘struct zend_string *’
      extern size_t strlen (const char *__s)
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:414:13: 警告: 互換性のないポインタ型からの代入です [デフォルトで有効]
      password = resource->pass;
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:425:2: 警告: 互換性のないポインタ型から 1 番目の ‘php_ssh2_session_connect’ の引数に渡しています [デフォルトで有効]
      session = php_ssh2_session_connect(resource->host, resource->port, methods, callbacks);
      ^
      In file included from /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:26:0:
      /usr/local/src/ssh2-1.1.2/php_ssh2.h:151:18: 備考: expected ‘char *’ but argument is of type ‘struct zend_string *’
      LIBSSH2_SESSION *php_ssh2_session_connect(char *host, int port, zval *methods, zval *callbacks);
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c: 関数 ‘php_ssh2_fopen_wrapper_shell’ 内:
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:634:4: 警告: 互換性のないポインタ型からの代入です [デフォルトで有効]
      s = resource->path ? resource->path : NULL;
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c: 関数 ‘php_ssh2_fopen_wrapper_exec’ 内:
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:881:2: 警告: 互換性のないポインタ型から 3 番目の ‘php_ssh2_exec_command’ の引数に渡しています [デフォルトで有効]
      stream = php_ssh2_exec_command(session, resource_id, resource->path + 1, terminal, terminal_len, environment, width, height, type);
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:737:20: 備考: expected ‘char *’ but argument is of type ‘struct zend_string *’
      static php_stream *php_ssh2_exec_command(LIBSSH2_SESSION *session, int resource_id, char *command, char *term, int term_len, zval *environment, long width, long height, long type)
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c: 関数 ‘php_ssh2_fopen_wrapper_scp’ 内:
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:1024:2: 警告: 互換性のないポインタ型から 3 番目の ‘php_ssh2_scp_xfer’ の引数に渡しています [デフォルトで有効]
      stream = php_ssh2_scp_xfer(session, resource_id, resource->path);
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:970:20: 備考: expected ‘char *’ but argument is of type ‘struct zend_string *’
      static php_stream *php_ssh2_scp_xfer(LIBSSH2_SESSION *session, int resource_id, char *filename)
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c: 関数 ‘php_ssh2_fopen_wrapper_tunnel’ 内:
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:1265:42: エラー: 二項演算子 == への無効な被演算子です (‘zend_string’ と ‘int’)
      if (resource->path && resource->path[0] == ‘/’) {
      ^
      /usr/local/src/ssh2-1.1.2/ssh2_fopen_wrappers.c:1268:8: 警告: 互換性のないポインタ型からの代入です [デフォルトで有効]
      host = resource->path + 1;
      ^
      make: *** [ssh2_fopen_wrappers.lo] エラー 1

Viewing 0 reply threads
  • You must be logged in to reply to this topic.

Next article

フォーラムについて