本次安装红框部分

注意:如遇到错误,请到最下面找对应的问题,进行解决
STF安装依赖版本要求:本次安装的版本是v3.4.2
STF的github地址:v3.4.2
STF的github地址::v3.6.1
- Node.js 8.x required (some dependencies don’t support newer versions)
- ADB properly set up
- RethinkDB >= 2.2
- GraphicsMagick (for resizing screenshots)
- ZeroMQ libraries installed
- Protocol Buffers libraries installed
- yasm installed (for compiling embedded libjpeg-turbo)
- pkg-config so that Node.js can find the libraries
注意,即使你直接从NPM安装了STF,你也需要这些依赖,因为它们不能包含在包中。
前提条件:
1、已安装java环境
验证
[root@localhost ~]# java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
2、已安装node.js
验证:试了很多版本都报错,最终还是选择了8版本
[root@WzcWyt ~]# node -v
v8.17.0
[root@WzcWyt ~]# npm -v
6.13.4
3、确定系统版本
[root@WzcWyt ~]# cat /etc/redhat-release
CentOS Linux release 8.4.2105
4、确定系统是32位还是64位(安装nodejs的时候选择安装包)
[root@WzcWyt ~]# getconf LONG_BIT
64
一、安装wget、unzip、zip
[root@WzcWyt ~]# yum install wget
[root@WzcWyt ~]# yum install -y unzip zip
二、Android SDK环境配置
[root@WzcWyt ~]# cd /usr/local
[root@WzcWyt local]# mkdir android
[root@WzcWyt local]# cd android
[root@WzcWyt android]# wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
[root@WzcWyt android]# unzip commandlinetools-linux-7583922_latest.zip
# 遇到问题1=================================
# cd cmdline-tools/bin/
# sdkmanager 这里直接使用会报错
# 以下解决问题1=================================
# cmdline-tools重新命名为tools
[root@WzcWyt android]# mv cmdline-tools tools
[root@WzcWyt android]# mkdir cmdline-tools
[root@WzcWyt android]# mv tools/ cmdline-tools/
配置环境变量
[root@WzcWyt bin]# vim /etc/profile
在文件中加入
#配置SDK
export PATH=$PATH:/usr/local/android/cmdline-tools/tools/bin
执行环境变量生效
[root@WzcWyt bin]# source /etc/profile
验证
列出下面可以安装的所有列表
[root@WzcWyt ~]# sdkmanager --list
[=======================================] 100% Computing updates...
Available Packages:
Path | Version | Description
------- | ------- | -------
...省略n行
...省略n行
system-images;android-Sv2;google_apis_playstore;arm64-v8a | 1 | Google Play ARM 64 v8a System Image
system-images;android-Sv2;google_apis_playstore;x86_64 | 1 | Google Play Intel x86 Atom_64 System Image
进行安装platform-tools,将上面名称复制下来进行安装
sdkmanager "platform-tools"
[root@WzcWyt android]# pwd
/usr/local/android
[root@WzcWyt android]# ll
drwxr-xr-x 3 root root 19 Nov 9 09:20 cmdline-tools
drwxr-xr-x 2 root root 33 Nov 9 10:04 licenses
drwxr-xr-x 4 root root 303 Nov 9 10:04 platform-tools
配置环境变量
[root@WzcWyt bin]# vim /etc/profile
在文件中加入
export PATH=$PATH:/usr/local/android/platform-tools
执行环境变量生效
[root@WzcWyt bin]# source /etc/profile
验证
[root@WzcWyt android]# sdkmanager --list
Installed packages:=====================] 100% Computing updates...
Path | Version | Description | Location
------- | ------- | ------- | -------
platform-tools | 31.0.3 | Android SDK Platform-Tools | platform-tools
Available Packages:
Path | Version | Description
------- | ------- | -------
...省略n行
...省略n行
system-images;android-Sv2;google_apis_playstore;arm64-v8a | 1 | Google Play ARM 64 v8a System Image
system-images;android-Sv2;google_apis_playstore;x86_64 | 1 | Google Play Intel x86 Atom_64 System Image
验证SDK环境
[root@WzcWyt android]# adb --version
Android Debug Bridge version 1.0.41
Version 31.0.3-7562133
Installed as /usr/local/android/platform-tools/adb
三、rethinkdb安装
[root@WzcWyt yum.repos.d]# sudo cat << EOF > /etc/yum.repos.d/rethinkdb.repo
> [rethinkdb]
> name=RethinkDB
> enabled=1
> baseurl=https://download.rethinkdb.com/repository/centos/8/x86_64/
> gpgkey=https://download.rethinkdb.com/repository/raw/pubkey.gpg
> gpgcheck=1
> EOF
[root@WzcWyt yum.repos.d]# pwd
/etc/yum.repos.d
[root@WzcWyt yum.repos.d]# ll
...省略n行
-rw-r--r-- 1 root root 179 Nov 9 10:38 rethinkdb.repo
安装
[root@WzcWyt yum.repos.d]# sudo yum install rethinkdb
验证
[root@WzcWyt yum.repos.d]# rethinkdb -v
rethinkdb 2.4.1 (CLANG 9.0.1 (Red Hat 9.0.1-2.module_el8.2.0+309+0c7b6b03))
四、GraphicsMagick安装
参考官网
官方安装步骤
这个不好下载,速度极慢,可以使用我下载好的




[root@WzcWyt wyt]# cd /usr/local/
[root@WzcWyt wyt]# wget https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.36/GraphicsMagick-1.3.36.tar.gz
[root@WzcWyt wyt]# tar zvxf GraphicsMagick-1.3.36.tar.gz
[root@WzcWyt local]# cd GraphicsMagick-1.3.36/
[root@WzcWyt GraphicsMagick-1.3.36]# ./configure
[root@WzcWyt GraphicsMagick-1.3.36]# make
[root@WzcWyt GraphicsMagick-1.3.36]# make install
验证
[root@WzcWyt GraphicsMagick-1.3.36]# gm
GraphicsMagick 1.3.36 20201226 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2020 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Usage: gm command [options ...]
Where commands include:
animate - animate a sequence of images
batch - issue multiple commands in interactive or batch mode
benchmark - benchmark one of the other commands
compare - compare two images
composite - composite images together
conjure - execute a Magick Scripting Language (MSL) XML script
convert - convert an image or sequence of images
display - display an image on a workstation running X
help - obtain usage message for named command
identify - describe an image or image sequence
import - capture an application or X server screen
mogrify - transform an image or sequence of images
montage - create a composite image (in a grid) from separate images
time - time one of the other commands
version - obtain release version
[root@WzcWyt GraphicsMagick-1.3.36]#
五、yasm安装
[root@WzcWyt wyt]# cd /usr/local/
[root@WzcWyt local]# wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
[root@WzcWyt local]# tar zxvf yasm-1.3.0.tar.gz
[root@WzcWyt local]# cd yasm-1.3.0/
[root@WzcWyt yasm-1.3.0]# ./configure
[root@WzcWyt yasm-1.3.0]# make
[root@WzcWyt yasm-1.3.0]# make install
验证
[root@WzcWyt local]# yasm --version
yasm 1.3.0
Compiled on Nov 9 2021.
Copyright (c) 2001-2014 Peter Johnson and other Yasm developers.
Run yasm --license for licensing overview and summary.
六、libsodium安装
[root@WzcWyt ~]# cd /usr/local/
[root@WzcWyt local]# wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz
[root@WzcWyt local]# tar zxvf libsodium-1.0.18.tar.gz
[root@WzcWyt local]# cd libsodium-1.0.18/
[root@WzcWyt libsodium-1.0.18]# ./configure
[root@WzcWyt libsodium-1.0.18]# make
[root@WzcWyt libsodium-1.0.18]# make install
验证
[root@WzcWyt libsodium-1.0.18]# whereis libsodium
libsodium: /usr/local/lib/libsodium.so /usr/local/lib/libsodium.la /usr/local/lib/libsodium.a
七、zeromq安装
[root@WzcWyt ~]# cd /usr/local/
[root@WzcWyt local]# wget https://github.com/zeromq/libzmq/releases/download/v4.3.4/zeromq-4.3.4.tar.gz
[root@WzcWyt local]# tar zxvf zeromq-4.3.4.tar.gz
[root@WzcWyt local]# cd zeromq-4.3.4/
[root@WzcWyt zeromq-4.3.4]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...省略n行
...省略n行
checking whether the C++ compiler works... no
configure: error: Unable to find a working C++ compiler
上面最后一行执行报错:configure: error: Unable to find a working C++ compiler(配置:错误:无法找到工作的C++编译器)导致下面执行make报错
# 执行make报错:
[root@WzcWyt zeromq-4.3.4]# make
make: *** No targets specified and no makefile found. Stop.
解决办法
[root@WzcWyt zeromq-4.3.4]# yum install gcc-c++
[root@WzcWyt zeromq-4.3.4]# ./configure
[root@WzcWyt zeromq-4.3.4]# make
[root@WzcWyt zeromq-4.3.4]# make install
验证
无
八、protobuf安装
[root@WzcWyt ~]# cd /usr/local/
[root@WzcWyt local]# wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.1/protobuf-cpp-3.19.1.tar.gz
[root@WzcWyt local]# tar zxvf protobuf-cpp-3.19.1.tar.gz
# 实际没有添加--prefix=/usr/local/protobuf
[root@WzcWyt protobuf-3.19.1]# ./configure --prefix=/usr/local/protobuf
[root@WzcWyt protobuf-3.19.1]# make
[root@WzcWyt protobuf-3.19.1]# make install
配置环境变量
[root@WzcWyt bin]# vi /etc/profile
在文件中加入
export PATH=$PATH:/usr/local/protobuf/bin/
export PKG_CONFIG_PATH=/usr/local/protobuf/lib/pkgconfig/
执行环境变量生效
[root@WzcWyt bin]# source /etc/profile
验证
# 刷新共享库 (很重要的一步啊)
[root@WzcWyt protobuf-3.19.1]# sudo ldconfig
[root@WzcWyt protobuf-3.19.1]# protoc --version
libprotoc 3.19.1
九、pkg-config安装
[root@WzcWyt ~]# cd /usr/local/
[root@WzcWyt local]# wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
[root@WzcWyt local]# tar zxvf pkg-config-0.29.2.tar.gz
[root@WzcWyt local]# cd pkg-config-0.29.2/
# 实际没有加--prefix=/usr/local/pkg-config
[root@WzcWyt pkg-config-0.29.2]# ./configure --prefix=/usr/local/pkg-config --with-internal-glib
[root@WzcWyt pkg-config-0.29.2]# make
[root@WzcWyt pkg-config-0.29.2]# make install
验证
[root@WzcWyt pkg-config-0.29.2]# pkg-config --version
0.29.2
十、安装STF,失败找问题2和问题3
[root@WzcWyt ~]# node -v
v8.17.0
[root@WzcWyt ~]# npm -v
6.13.4
[root@WzcWyt ~]# npm install --unsafe-perm --verbose -g stf
...省略n行
...省略n行
+ stf@3.4.1
added 764 packages from 635 contributors in 75.99s
npm verb exit [ 0, true ]
npm timing npm Completed in 76294ms
npm info ok
[root@WzcWyt ~]#
验证,失败找问题4
[root@WzcWyt ~]# cd /usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/bin/
[root@WzcWyt bin]# ./stf doctor
2021-11-10T08:39:55.535Z INF/cli:doctor 824337 [*] OS Arch: x64
2021-11-10T08:39:55.537Z INF/cli:doctor 824337 [*] OS Platform: linux
2021-11-10T08:39:55.537Z INF/cli:doctor 824337 [*] OS Platform: 4.18.0-240.22.1.el8_3.x86_64
2021-11-10T08:39:55.538Z INF/cli:doctor 824337 [*] Using Node 8.17.0
2021-11-10T08:39:55.564Z INF/cli:doctor 824337 [*] Using ZeroMQ 4.3.4
2021-11-10T08:39:55.580Z INF/cli:doctor 824337 [*] Using RethinkDB 2.4.1
2021-11-10T08:39:55.581Z INF/cli:doctor 824337 [*] Using GraphicsMagick 1.3.36
2021-11-10T08:39:55.581Z INF/cli:doctor 824337 [*] Using ProtoBuf 3.19.1
2021-11-10T08:39:55.581Z INF/cli:doctor 824337 [*] Using ADB 1.0.41
[root@WzcWyt bin]#
环境到此搭建完成。
启动stf
1、启动rethinkDB
指定端口和缓冲大小启动
[root@WzcWyt bin]# rethinkdb --bind all --cache-size 8192 --http-port 8081
Running rethinkdb 2.4.1 (CLANG 9.0.1 (Red Hat 9.0.1-2.module_el8.2.0+309+0c7b6b03))...
Running on Linux 4.18.0-240.22.1.el8_3.x86_64 x86_64
Loading data from directory /usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/bin/rethinkdb_data
warn: Cache size is larger than available memory.
Listening for intracluster connections on port 29015
Listening for client driver connections on port 28015
Listening for administrative HTTP connections on port 8081
Listening on cluster addresses: 127.0.0.1, 172.17.212.213, ::1, fe80::216:3eff:fe16:bdeb%2
Listening on driver addresses: 127.0.0.1, 172.17.212.213, ::1, fe80::216:3eff:fe16:bdeb%2
Listening on http addresses: 127.0.0.1, 172.17.212.213, ::1, fe80::216:3eff:fe16:bdeb%2
Server ready, "WzcWyt_iis" 2055f083-2b4a-4269-8be0-f1e46264df65
2、再打开一个窗口,启动stf
进入stf目录
[root@WzcWyt ~]# cd /usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/bin/
执行如下命令,IP 为本机电脑 IP,加上参数–allow-remote 可以远程调试手机
[root@WzcWyt bin]# ./stf local --public-ip 59.110.171.91 --allow-remote
2021-11-10T09:25:39.878Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli migrate"
2021-11-10T09:25:40.106Z INF/db 825002 [*] Connecting to 127.0.0.1:28015
2021-11-10T09:25:40.123Z INF/db:setup 825002 [*] Database "stf" already exists
2021-11-10T09:25:40.130Z INF/db:setup 825002 [*] Table "users" already exists
2021-11-10T09:25:40.130Z INF/db:setup 825002 [*] Table "accessTokens" already exists
2021-11-10T09:25:40.130Z INF/db:setup 825002 [*] Table "vncauth" already exists
2021-11-10T09:25:40.130Z INF/db:setup 825002 [*] Table "devices" already exists
2021-11-10T09:25:40.130Z INF/db:setup 825002 [*] Table "logs" already exists
2021-11-10T09:25:40.136Z INF/db:setup 825002 [*] Index "users"."adbKeys" already exists
2021-11-10T09:25:40.136Z INF/db:setup 825002 [*] Waiting for index "users"."adbKeys"
2021-11-10T09:25:40.138Z INF/db:setup 825002 [*] Index "accessTokens"."email" already exists
2021-11-10T09:25:40.138Z INF/db:setup 825002 [*] Index "vncauth"."response" already exists
2021-11-10T09:25:40.138Z INF/db:setup 825002 [*] Index "vncauth"."responsePerDevice" already exists
2021-11-10T09:25:40.138Z INF/db:setup 825002 [*] Waiting for index "accessTokens"."email"
2021-11-10T09:25:40.139Z INF/db:setup 825002 [*] Waiting for index "vncauth"."response"
2021-11-10T09:25:40.139Z INF/db:setup 825002 [*] Waiting for index "vncauth"."responsePerDevice"
2021-11-10T09:25:40.141Z INF/db:setup 825002 [*] Index "devices"."owner" already exists
2021-11-10T09:25:40.141Z INF/db:setup 825002 [*] Index "devices"."present" already exists
2021-11-10T09:25:40.142Z INF/db:setup 825002 [*] Index "devices"."providerChannel" already exists
2021-11-10T09:25:40.142Z INF/db:setup 825002 [*] Index "users"."adbKeys" is ready
2021-11-10T09:25:40.142Z INF/db:setup 825002 [*] Waiting for index "devices"."owner"
2021-11-10T09:25:40.142Z INF/db:setup 825002 [*] Waiting for index "devices"."present"
2021-11-10T09:25:40.142Z INF/db:setup 825002 [*] Waiting for index "devices"."providerChannel"
2021-11-10T09:25:40.143Z INF/db:setup 825002 [*] Index "accessTokens"."email" is ready
2021-11-10T09:25:40.144Z INF/db:setup 825002 [*] Index "vncauth"."response" is ready
2021-11-10T09:25:40.144Z INF/db:setup 825002 [*] Index "vncauth"."responsePerDevice" is ready
2021-11-10T09:25:40.144Z INF/db:setup 825002 [*] Index "devices"."owner" is ready
2021-11-10T09:25:40.145Z INF/db:setup 825002 [*] Index "devices"."present" is ready
2021-11-10T09:25:40.145Z INF/db:setup 825002 [*] Index "devices"."providerChannel" is ready
2021-11-10T09:25:40.151Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli triproxy app001 --bind-pub tcp://127.0.0.1:7111 --bind-dealer tcp://127.0.0.1:7112 --bind-pull tcp://127.0.0.1:7113"
2021-11-10T09:25:40.160Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli triproxy dev001 --bind-pub tcp://127.0.0.1:7114 --bind-dealer tcp://127.0.0.1:7115 --bind-pull tcp://127.0.0.1:7116"
2021-11-10T09:25:40.182Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli processor proc001 --connect-app-dealer tcp://127.0.0.1:7112 --connect-dev-dealer tcp://127.0.0.1:7115"
2021-11-10T09:25:40.189Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli processor proc002 --connect-app-dealer tcp://127.0.0.1:7112 --connect-dev-dealer tcp://127.0.0.1:7115"
2021-11-10T09:25:40.207Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli reaper reaper001 --connect-push tcp://127.0.0.1:7116 --connect-sub tcp://127.0.0.1:7111"
2021-11-10T09:25:40.223Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli provider --name WzcWyt --min-port 7400 --max-port 7700 --connect-sub tcp://127.0.0.1:7114 --connect-push tcp://127.0.0.1:7116 --group-timeout 900 --public-ip 59.110.171.91 --storage-url http://localhost:7100/ --adb-host 127.0.0.1 --adb-port 5037 --vnc-initial-size 600x800 --mute-master never --allow-remote"
2021-11-10T09:25:40.269Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli auth-mock --port 7120 --secret kute kittykat --app-url http://59.110.171.91:7100/"
2021-11-10T09:25:40.302Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli app --port 7105 --secret kute kittykat --auth-url http://59.110.171.91:7100/auth/mock/ --websocket-url http://59.110.171.91:7110/"
2021-11-10T09:25:40.351Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli api --port 7106 --secret kute kittykat --connect-push tcp://127.0.0.1:7113 --connect-sub tcp://127.0.0.1:7111"
2021-11-10T09:25:40.389Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli websocket --port 7110 --secret kute kittykat --storage-url http://localhost:7100/ --connect-sub tcp://127.0.0.1:7111 --connect-push tcp://127.0.0.1:7113"
2021-11-10T09:25:40.418Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli storage-temp --port 7102"
2021-11-10T09:25:40.447Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli storage-plugin-image --port 7103 --storage-url http://localhost:7100/"
2021-11-10T09:25:40.475Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli storage-plugin-apk --port 7104 --storage-url http://localhost:7100/"
2021-11-10T09:25:40.523Z INF/util:procutil 824996 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli poorxy --port 7100 --app-url http://localhost:7105/ --auth-url http://localhost:7120/ --api-url http://localhost:7106/ --websocket-url http://localhost:7110/ --storage-url http://localhost:7102/ --storage-plugin-image-url http://localhost:7103/ --storage-plugin-apk-url http://localhost:7104/"
2021-11-10T09:25:41.258Z INF/poorxy 825081 [*] Listening on port 7100
2021-11-10T09:25:41.454Z INF/triproxy 825008 [app001] PUB socket bound on tcp://127.0.0.1:7111
2021-11-10T09:25:41.456Z INF/triproxy 825008 [app001] DEALER socket bound on tcp://127.0.0.1:7112
2021-11-10T09:25:41.457Z INF/triproxy 825008 [app001] PULL socket bound on tcp://127.0.0.1:7113
2021-11-10T09:25:41.497Z INF/triproxy 825014 [dev001] PUB socket bound on tcp://127.0.0.1:7114
2021-11-10T09:25:41.499Z INF/triproxy 825014 [dev001] DEALER socket bound on tcp://127.0.0.1:7115
2021-11-10T09:25:41.500Z INF/triproxy 825014 [dev001] PULL socket bound on tcp://127.0.0.1:7116
2021-11-10T09:25:41.725Z INF/auth-mock 825039 [*] Listening on port 7120
2021-11-10T09:25:42.206Z INF/db 825020 [*] Connecting to 127.0.0.1:28015
2021-11-10T09:25:42.248Z INF/processor 825020 [proc001] App dealer connected to "tcp://127.0.0.1:7112"
2021-11-10T09:25:42.249Z INF/processor 825020 [proc001] Device dealer connected to "tcp://127.0.0.1:7115"
2021-11-10T09:25:42.330Z INF/db 825021 [*] Connecting to 127.0.0.1:28015
2021-11-10T09:25:42.429Z INF/processor 825021 [proc002] App dealer connected to "tcp://127.0.0.1:7112"
2021-11-10T09:25:42.430Z INF/processor 825021 [proc002] Device dealer connected to "tcp://127.0.0.1:7115"
2021-11-10T09:25:42.677Z INF/reaper 825027 [reaper001] Subscribing to permanent channel "*ALL"
2021-11-10T09:25:42.680Z INF/reaper 825027 [reaper001] Reaping devices with no heartbeat
2021-11-10T09:25:42.727Z INF/db 825027 [reaper001] Connecting to 127.0.0.1:28015
2021-11-10T09:25:42.732Z INF/reaper 825027 [reaper001] Receiving input from "tcp://127.0.0.1:7111"
2021-11-10T09:25:42.732Z INF/reaper 825027 [reaper001] Sending output to "tcp://127.0.0.1:7116"
2021-11-10T09:25:42.751Z INF/storage:plugins:image 825074 [*] Listening on port 7103
2021-11-10T09:25:42.781Z INF/provider 825033 [*] Subscribing to permanent channel "IyuA3lgLRkqwBaqTHHobvg=="
2021-11-10T09:25:42.956Z INF/provider 825033 [*] Sending output to "tcp://127.0.0.1:7116"
2021-11-10T09:25:42.957Z INF/provider 825033 [*] Receiving input from "tcp://127.0.0.1:7114"
2021-11-10T09:25:43.013Z INF/provider 825033 [*] Tracking devices
2021-11-10T09:25:43.085Z INF/storage:temp 825063 [*] Listening on port 7102
2021-11-10T09:25:43.107Z INF/storage:plugins:apk 825075 [*] Listening on port 7104
2021-11-10T09:25:43.209Z INF/app 825045 [*] Using pre-built resources
2021-11-10T09:25:43.219Z INF/app 825045 [*] Listening on port 7105
2021-11-10T09:25:43.221Z INF/db 825045 [*] Connecting to 127.0.0.1:28015
2021-11-10T09:25:43.363Z INF/websocket 825062 [*] Subscribing to permanent channel "*ALL"
2021-11-10T09:25:43.369Z INF/websocket 825062 [*] Listening on port 7110
2021-11-10T09:25:43.371Z INF/db 825062 [*] Connecting to 127.0.0.1:28015
2021-11-10T09:25:43.375Z INF/websocket 825062 [*] Sending output to "tcp://127.0.0.1:7113"
2021-11-10T09:25:43.375Z INF/websocket 825062 [*] Receiving input from "tcp://127.0.0.1:7111"
2021-11-10T09:25:43.486Z INF/api 825056 [*] Subscribing to permanent channel "*ALL"
2021-11-10T09:25:43.534Z INF/api 825056 [*] Listening on port 7106
2021-11-10T09:25:43.574Z INF/api 825056 [*] Sending output to "tcp://127.0.0.1:7113"
2021-11-10T09:25:43.575Z INF/api 825056 [*] Receiving input from "tcp://127.0.0.1:7111"
2021-11-10T09:25:43.718Z INF/db 825056 [*] Connecting to 127.0.0.1:28015
3、在浏览器中输入http://59.110.171.91:7100就可以打开网页,随便输入姓名和一个邮箱,就可以登录


链接手机
遇到问题1
[root@WzcWyt bin]# sdkmanager --list
Error: Could not determine SDK root.
Error: Either specify it explicitly with --sdk_root= or move this package into its expected location: <sdk>/cmdline-tools/latest/
解决:
解压SDK工具包后,将获得的最顶层目录是cmdline-tools。将解包目录从cmdline-tools重命名为tools,并将其置于/usr/local/android/cmdline-tools目录下
遇到问题2
下面的nodejs遇到的问题
[root@WzcWyt android]# node -v
v12.22.5
[root@WzcWyt android]# npm -v
6.14.14
或
[root@WzcWyt ~]# node -v
v8.17.0
[root@WzcWyt ~]# npm -v
6.13.4
[root@WzcWyt ~]# sudo npm install -g stf
npm WARN deprecated @slack/client@3.16.0: v3.x and lower are no longer supported. see migration guide: https://github.com/slackapi/node-slack-sdk/wiki/Migration-Guide-for-v4
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.76.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@2.0.6: this library is no longer supported
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated highlight.js@8.2.0: Version no longer supported. Upgrade to @latest
npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated xmldom@0.1.19: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated ejs@0.8.8: Critical security bugs fixed in 2.5.5
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/usr/local/bin/stf -> /usr/local/lib/node_modules/stf/bin/stf
> dtrace-provider@0.8.8 install /usr/local/lib/node_modules/stf/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/12.22.5"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/stf/node_modules/dtrace-provider/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/stf/node_modules/dtrace-provider/.node-gyp'
gyp ERR! System Linux 4.18.0-240.22.1.el8_3.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/stf/node_modules/dtrace-provider
gyp ERR! node -v v12.22.5
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
> bufferutil@1.3.0 install /usr/local/lib/node_modules/stf/node_modules/bufferutil
> node-gyp rebuild
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/12.22.5"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/stf/node_modules/bufferutil/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/stf/node_modules/bufferutil/.node-gyp'
gyp ERR! System Linux 4.18.0-240.22.1.el8_3.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/stf/node_modules/bufferutil
gyp ERR! node -v v12.22.5
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bufferutil@1.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bufferutil@1.3.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-09T09_24_04_929Z-debug.log
解决办法
[root@WzcWyt ~]# npm install --unsafe-perm --verbose -g stf
...省略n行
...省略n行
+ stf@3.4.1
added 764 packages from 635 contributors in 75.99s
npm verb exit [ 0, true ]
npm timing npm Completed in 76294ms
npm info ok
遇到问题3
[root@WzcWyt node-v16.13.0-linux-x64]# node -v
v16.13.0
[root@WzcWyt node-v16.13.0-linux-x64]# npm -v
8.1.0
[root@WzcWyt ~]# npm install -g stf
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated cryptiles@2.0.5: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated xmldom@0.1.19: Deprecated due to CVE-2021-21366 resolved in 0.5.0
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.3.2: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated har-validator@2.0.6: this library is no longer supported
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated request@2.76.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated ejs@0.8.8: Critical security bugs fixed in 2.5.5
npm WARN deprecated highlight.js@8.2.0: Version no longer supported. Upgrade to @latest
npm WARN deprecated @slack/client@3.16.0: v3.x and lower are no longer supported. see migration guide: https://github.com/slackapi/node-slack-sdk/wiki/Migration-Guide-for-v4
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm notice
npm notice New patch version of npm available! 8.1.0 -> 8.1.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.1.3
npm notice Run npm install -g npm@8.1.3 to update!
npm notice
npm ERR! code 1
npm ERR! path /usr/local/node-v16.13.0-linux-x64/lib/node_modules/stf/node_modules/bufferutil
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/usr/local/node-v16.13.0-linux-x64/lib/node_modules/stf/node_modules/bufferutil/build'
npm ERR! CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
npm ERR! make: Leaving directory '/usr/local/node-v16.13.0-linux-x64/lib/node_modules/stf/node_modules/bufferutil/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.2.0
npm ERR! gyp info using node@16.13.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.9.4 found at "/usr/local/python3/bin/python3"
npm ERR! gyp WARN EACCES current user does not have permission to access the dev dir "/root/.cache/node-gyp/16.13.0"
npm ERR! gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.0/node-v16.13.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.13.0/node-v16.13.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.13.0/SHASUMS256.txt
npm ERR! gyp info spawn /usr/local/python3/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/node-v16.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/node-v16.13.0-linux-x64/lib/node_modules/stf/node_modules/bufferutil/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/node-v16.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/tmp/.node-gyp/16.13.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/tmp/.node-gyp/16.13.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/node-v16.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/tmp/.node-gyp/16.13.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/usr/local/node-v16.13.0-linux-x64/lib/node_modules/stf/node_modules/bufferutil',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../../nan/nan.h:190,
npm ERR! from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
npm ERR! ../../nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
npm ERR! return obj->ForceSet(GetCurrentContext(), key, value, attribs);
npm ERR! ^~~~~~~~
npm ERR! In file included from ../../nan/nan_converters.h:59,
npm ERR! from ../../nan/nan.h:195,
npm ERR! from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ToFactoryBase<v8::Boolean>::return_t Nan::imp::ToFactory<v8::Boolean>::convert(v8::Local<v8::Value>)’:
npm ERR! ../../nan/nan_converters_43_inl.h:15:45: error: no matching function for call to ‘v8::Value::ToBoolean(v8::Local<v8::Context>)’
npm ERR! return val->To ## TYPE(GetCurrentContext()); \
npm ERR! ^
npm ERR! ../../nan/nan_converters_43_inl.h:18:1: note: in expansion of macro ‘X’
npm ERR! X(Boolean)
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3086:18: note: candidate: ‘v8::Local<v8::Boolean> v8::Value::ToBoolean(v8::Isolate*) const’
npm ERR! Local<Boolean> ToBoolean(Isolate* isolate) const;
npm ERR! ^~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3086:18: note: no known conversion for argument 1 from ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
npm ERR! In file included from ../../nan/nan_converters.h:59,
npm ERR! from ../../nan/nan.h:195,
npm ERR! from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ValueFactoryBase<bool>::return_t Nan::imp::ToFactory<bool>::convert(v8::Local<v8::Value>)’:
npm ERR! ../../nan/nan_converters_43_inl.h:31:48: error: no matching function for call to ‘v8::Value::BooleanValue(v8::Local<v8::Context>)’
npm ERR! return val->NAME ## Value(GetCurrentContext()); \
npm ERR! ^
npm ERR! ../../nan/nan_converters_43_inl.h:34:1: note: in expansion of macro ‘X’
npm ERR! X(bool, Boolean)
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3096:8: note: candidate: ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
npm ERR! bool BooleanValue(Isolate* isolate) const;
npm ERR! ^~~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3096:8: note: no known conversion for argument 1 from ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
npm ERR! In file included from ../../nan/nan_new.h:189,
npm ERR! from ../../nan/nan.h:196,
npm ERR! from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Function>::return_t Nan::imp::Factory<v8::Function>::New(Nan::FunctionCallback, v8::Local<v8::Value>)’:
npm ERR! ../../nan/nan_implementation_12_inl.h:109:32: error: no matching function for call to ‘v8::Function::New(v8::Isolate*&, void (&)(const v8::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Object>&)’
npm ERR! , obj));
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4753:31: note: candidate: ‘static v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>, v8::FunctionCallback, v8::Local<v8::Value>, int, v8::ConstructorBehavior, v8::SideEffectType)’
npm ERR! static MaybeLocal<Function> New(
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4753:31: note: no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::Local<v8::Context>’
npm ERR! In file included from ../../nan/nan_new.h:189,
npm ERR! from ../../nan/nan.h:196,
npm ERR! from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::StringObject>::return_t Nan::imp::Factory<v8::StringObject>::New(v8::Local<v8::String>)’:
npm ERR! ../../nan/nan_implementation_12_inl.h:345:37: error: no matching function for call to ‘v8::StringObject::New(v8::Local<v8::String>&)’
npm ERR! return v8::StringObject::New(value).As<v8::StringObject>();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:6196:23: note: candidate: ‘static v8::Local<v8::Value> v8::StringObject::New(v8::Isolate*, v8::Local<v8::String>)’
npm ERR! static Local<Value> New(Isolate* isolate, Local<String> value);
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:6196:23: note: candidate expects 2 arguments, 1 provided
npm ERR! In file included from ../../nan/nan_new.h:189,
npm ERR! from ../../nan/nan.h:196,
npm ERR! from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan_implementation_12_inl.h:345:58: error: expected primary-expression before ‘>’ token
npm ERR! return v8::StringObject::New(value).As<v8::StringObject>();
npm ERR! ^
npm ERR! ../../nan/nan_implementation_12_inl.h:345:60: error: expected primary-expression before ‘)’ token
npm ERR! return v8::StringObject::New(value).As<v8::StringObject>();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’:
npm ERR! ../../nan/nan.h:817:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
npm ERR! v8::Isolate::GetCurrent(), target, func, argc, argv);
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:8:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:184:50: note: declared here
npm ERR! NODE_EXTERN v8::Local<v8::Value> MakeCallback(
npm ERR! ^~~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:101:42: note: in definition of macro ‘NODE_DEPRECATED’
npm ERR! __attribute__((deprecated(message))) declarator
npm ERR! ^~~~~~~~~~
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h:817:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
npm ERR! v8::Isolate::GetCurrent(), target, func, argc, argv);
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:8:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:184:50: note: declared here
npm ERR! NODE_EXTERN v8::Local<v8::Value> MakeCallback(
npm ERR! ^~~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:101:42: note: in definition of macro ‘NODE_DEPRECATED’
npm ERR! __attribute__((deprecated(message))) declarator
npm ERR! ^~~~~~~~~~
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’:
npm ERR! ../../nan/nan.h:831:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
npm ERR! v8::Isolate::GetCurrent(), target, symbol, argc, argv);
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:8:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:177:50: note: declared here
npm ERR! NODE_EXTERN v8::Local<v8::Value> MakeCallback(
npm ERR! ^~~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:101:42: note: in definition of macro ‘NODE_DEPRECATED’
npm ERR! __attribute__((deprecated(message))) declarator
npm ERR! ^~~~~~~~~~
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h:831:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
npm ERR! v8::Isolate::GetCurrent(), target, symbol, argc, argv);
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:8:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:177:50: note: declared here
npm ERR! NODE_EXTERN v8::Local<v8::Value> MakeCallback(
npm ERR! ^~~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:101:42: note: in definition of macro ‘NODE_DEPRECATED’
npm ERR! __attribute__((deprecated(message))) declarator
npm ERR! ^~~~~~~~~~
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’:
npm ERR! ../../nan/nan.h:845:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
npm ERR! v8::Isolate::GetCurrent(), target, method, argc, argv);
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:8:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:170:50: note: declared here
npm ERR! NODE_EXTERN v8::Local<v8::Value> MakeCallback(
npm ERR! ^~~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:101:42: note: in definition of macro ‘NODE_DEPRECATED’
npm ERR! __attribute__((deprecated(message))) declarator
npm ERR! ^~~~~~~~~~
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h:845:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
npm ERR! v8::Isolate::GetCurrent(), target, method, argc, argv);
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:8:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:170:50: note: declared here
npm ERR! NODE_EXTERN v8::Local<v8::Value> MakeCallback(
npm ERR! ^~~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:101:42: note: in definition of macro ‘NODE_DEPRECATED’
npm ERR! __attribute__((deprecated(message))) declarator
npm ERR! ^~~~~~~~~~
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
npm ERR! ../../nan/nan.h:890:53: error: no matching function for call to ‘v8::Value::ToString()’
npm ERR! v8::Local<v8::String> string = from->ToString();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
npm ERR! ^~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate expects 1 argument, 0 provided
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h:900:74: error: no matching function for call to ‘v8::String::WriteUtf8(char*&, int, int, const int&)’
npm ERR! length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3277:7: note: candidate: ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’
npm ERR! int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
npm ERR! ^~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3277:7: note: no known conversion for argument 1 from ‘char*’ to ‘v8::Isolate*’
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const’:
npm ERR! ../../nan/nan.h:1453:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
npm ERR! ));
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:8:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:184:50: note: declared here
npm ERR! NODE_EXTERN v8::Local<v8::Value> MakeCallback(
npm ERR! ^~~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:101:42: note: in definition of macro ‘NODE_DEPRECATED’
npm ERR! __attribute__((deprecated(message))) declarator
npm ERR! ^~~~~~~~~~
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h:1453:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
npm ERR! ));
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:8:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:184:50: note: declared here
npm ERR! NODE_EXTERN v8::Local<v8::Value> MakeCallback(
npm ERR! ^~~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:101:42: note: in definition of macro ‘NODE_DEPRECATED’
npm ERR! __attribute__((deprecated(message))) declarator
npm ERR! ^~~~~~~~~~
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)’:
npm ERR! ../../nan/nan.h:1507:64: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, const v8::Local<v8::Value>&)’
npm ERR! New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3961:37: note: candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3964:37: note: candidate expects 3 arguments, 2 provided
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const v8::Local<v8::String>&, const v8::Local<v8::Value>&)’:
npm ERR! ../../nan/nan.h:1513:42: error: no matching function for call to ‘v8::Object::Set(const v8::Local<v8::String>&, const v8::Local<v8::Value>&)’
npm ERR! New(persistentHandle)->Set(key, value);
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3961:37: note: candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3964:37: note: candidate expects 3 arguments, 2 provided
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(uint32_t, const v8::Local<v8::Value>&)’:
npm ERR! ../../nan/nan.h:1519:44: error: no matching function for call to ‘v8::Object::Set(uint32_t&, const v8::Local<v8::Value>&)’
npm ERR! New(persistentHandle)->Set(index, value);
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3961:37: note: candidate expects 3 arguments, 2 provided
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
npm ERR! V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3964:37: note: candidate expects 3 arguments, 2 provided
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const’:
npm ERR! ../../nan/nan.h:1525:61: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
npm ERR! New(persistentHandle)->Get(New(key).ToLocalChecked()));
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate expects 2 arguments, 1 provided
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate expects 2 arguments, 1 provided
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const v8::Local<v8::String>&) const’:
npm ERR! ../../nan/nan.h:1531:55: error: no matching function for call to ‘v8::Object::Get(const v8::Local<v8::String>&)’
npm ERR! return scope.Escape(New(persistentHandle)->Get(key));
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate expects 2 arguments, 1 provided
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate expects 2 arguments, 1 provided
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(uint32_t) const’:
npm ERR! ../../nan/nan.h:1536:57: error: no matching function for call to ‘v8::Object::Get(uint32_t&)’
npm ERR! return scope.Escape(New(persistentHandle)->Get(index));
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate expects 2 arguments, 1 provided
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate expects 2 arguments, 1 provided
npm ERR! In file included from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
npm ERR! ../../nan/nan.h:1704:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
npm ERR! , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
npm ERR! ^
npm ERR! In file included from /usr/include/c++/8/cassert:44,
npm ERR! from /tmp/.node-gyp/16.13.0/include/node/node_object_wrap.h:26,
npm ERR! from ../src/bufferutil.cc:11:
npm ERR! ../../nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’:
npm ERR! ../../nan/nan_object_wrap.h:24:25: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
npm ERR! assert(persistent().IsNearDeath());
npm ERR! ^~~~~~~~~~~
npm ERR! In file included from ../../nan/nan.h:2190,
npm ERR! from ../src/bufferutil.cc:16:
npm ERR! ../../nan/nan_object_wrap.h: In member function ‘void Nan::ObjectWrap::MakeWeak()’:
npm ERR! ../../nan/nan_object_wrap.h:67:18: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘MarkIndependent’
npm ERR! persistent().MarkIndependent();
npm ERR! ^~~~~~~~~~~~~~~
npm ERR! In file included from /usr/include/c++/8/cassert:44,
npm ERR! from /tmp/.node-gyp/16.13.0/include/node/node_object_wrap.h:26,
npm ERR! from ../src/bufferutil.cc:11:
npm ERR! ../../nan/nan_object_wrap.h: In static member function ‘static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’:
npm ERR! ../../nan/nan_object_wrap.h:124:26: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
npm ERR! assert(wrap->handle_.IsNearDeath());
npm ERR! ^~~~~~~~~~~
npm ERR! ../src/bufferutil.cc: At global scope:
npm ERR! ../src/bufferutil.cc:25:30: error: ‘v8::Handle’ has not been declared
npm ERR! static void Initialize(v8::Handle<v8::Object> target)
npm ERR! ^~~~~~
npm ERR! ../src/bufferutil.cc:25:36: error: expected ‘,’ or ‘...’ before ‘<’ token
npm ERR! static void Initialize(v8::Handle<v8::Object> target)
npm ERR! ^
npm ERR! ../src/bufferutil.cc: In static member function ‘static void BufferUtil::Initialize(int)’:
npm ERR! ../src/bufferutil.cc:33:14: error: ‘target’ was not declared in this scope
npm ERR! Nan::Set(target, Nan::New<String>("BufferUtil").ToLocalChecked(), t->GetFunction());
npm ERR! ^~~~~~
npm ERR! ../src/bufferutil.cc:33:14: note: suggested alternative: ‘Merge’
npm ERR! Nan::Set(target, Nan::New<String>("BufferUtil").ToLocalChecked(), t->GetFunction());
npm ERR! ^~~~~~
npm ERR! Merge
npm ERR! ../src/bufferutil.cc:33:86: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
npm ERR! Nan::Set(target, Nan::New<String>("BufferUtil").ToLocalChecked(), t->GetFunction());
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:6802:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
npm ERR! ^~~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:6802:46: note: candidate expects 1 argument, 0 provided
npm ERR! ../src/bufferutil.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BufferUtil::Merge(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/bufferutil.cc:49:49: error: no matching function for call to ‘v8::Value::ToObject()’
npm ERR! Local<Object> bufferObj = info[0]->ToObject();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
npm ERR! ^~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate expects 1 argument, 0 provided
npm ERR! ../src/bufferutil.cc:56:39: error: no matching function for call to ‘v8::Array::Get(unsigned int&)’
npm ERR! Local<Object> src = array->Get(i)->ToObject();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate expects 2 arguments, 1 provided
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! ^~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate expects 2 arguments, 1 provided
npm ERR! ../src/bufferutil.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BufferUtil::Unmask(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/bufferutil.cc:67:50: error: no matching function for call to ‘v8::Value::ToObject()’
npm ERR! Local<Object> buffer_obj = info[0]->ToObject();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
npm ERR! ^~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate expects 1 argument, 0 provided
npm ERR! ../src/bufferutil.cc:68:48: error: no matching function for call to ‘v8::Value::ToObject()’
npm ERR! Local<Object> mask_obj = info[1]->ToObject();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
npm ERR! ^~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate expects 1 argument, 0 provided
npm ERR! ../src/bufferutil.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BufferUtil::Mask(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/bufferutil.cc:109:50: error: no matching function for call to ‘v8::Value::ToObject()’
npm ERR! Local<Object> buffer_obj = info[0]->ToObject();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
npm ERR! ^~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate expects 1 argument, 0 provided
npm ERR! ../src/bufferutil.cc:110:48: error: no matching function for call to ‘v8::Value::ToObject()’
npm ERR! Local<Object> mask_obj = info[1]->ToObject();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
npm ERR! ^~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate expects 1 argument, 0 provided
npm ERR! ../src/bufferutil.cc:111:50: error: no matching function for call to ‘v8::Value::ToObject()’
npm ERR! Local<Object> output_obj = info[2]->ToObject();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
npm ERR! ^~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3060:44: note: candidate expects 1 argument, 0 provided
npm ERR! ../src/bufferutil.cc:112:45: error: no matching function for call to ‘v8::Value::Int32Value()’
npm ERR! size_t dataOffset = info[3]->Int32Value();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR! V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR! ^~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3107:40: note: candidate expects 1 argument, 0 provided
npm ERR! ../src/bufferutil.cc:113:41: error: no matching function for call to ‘v8::Value::Int32Value()’
npm ERR! size_t length = info[4]->Int32Value();
npm ERR! ^
npm ERR! In file included from ../src/bufferutil.cc:7:
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3107:40: note: candidate: ‘v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const’
npm ERR! V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
npm ERR! ^~~~~~~~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/v8.h:3107:40: note: candidate expects 1 argument, 0 provided
npm ERR! ../src/bufferutil.cc: At global scope:
npm ERR! ../src/bufferutil.cc:158:12: error: variable or field ‘init’ declared void
npm ERR! void init (Handle<Object> target)
npm ERR! ^~~~~~
npm ERR! ../src/bufferutil.cc:158:12: error: ‘Handle’ was not declared in this scope
npm ERR! ../src/bufferutil.cc:158:12: note: suggested alternative: ‘rand_r’
npm ERR! void init (Handle<Object> target)
npm ERR! ^~~~~~
npm ERR! rand_r
npm ERR! ../src/bufferutil.cc:158:25: error: expected primary-expression before ‘>’ token
npm ERR! void init (Handle<Object> target)
npm ERR! ^
npm ERR! ../src/bufferutil.cc:158:27: error: ‘target’ was not declared in this scope
npm ERR! void init (Handle<Object> target)
npm ERR! ^~~~~~
npm ERR! ../src/bufferutil.cc:158:27: note: suggested alternative: ‘tzset’
npm ERR! void init (Handle<Object> target)
npm ERR! ^~~~~~
npm ERR! tzset
npm ERR! In file included from ../src/bufferutil.cc:8:
npm ERR! ../src/bufferutil.cc:164:25: error: ‘init’ was not declared in this scope
npm ERR! NODE_MODULE(bufferutil, init)
npm ERR! ^~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:821:36: note: in definition of macro ‘NODE_MODULE_X’
npm ERR! (node::addon_register_func) (regfunc), \
npm ERR! ^~~~~~~
npm ERR! ../src/bufferutil.cc:164:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR! NODE_MODULE(bufferutil, init)
npm ERR! ^~~~~~~~~~~
npm ERR! ../src/bufferutil.cc:164:25: note: suggested alternative: ‘int’
npm ERR! NODE_MODULE(bufferutil, init)
npm ERR! ^~~~
npm ERR! /tmp/.node-gyp/16.13.0/include/node/node.h:821:36: note: in definition of macro ‘NODE_MODULE_X’
npm ERR! (node::addon_register_func) (regfunc), \
npm ERR! ^~~~~~~
npm ERR! ../src/bufferutil.cc:164:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR! NODE_MODULE(bufferutil, init)
npm ERR! ^~~~~~~~~~~
npm ERR! make: *** [bufferutil.target.mk:113: Release/obj.target/bufferutil/src/bufferutil.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/node-v16.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 4.18.0-240.22.1.el8_3.x86_64
npm ERR! gyp ERR! command "/usr/local/node-v16.13.0-linux-x64/bin/node" "/usr/local/node-v16.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /usr/local/node-v16.13.0-linux-x64/lib/node_modules/stf/node_modules/bufferutil
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-10T06_48_46_803Z-debug.log
解决办法:更换nodejs版本
[root@WzcWyt ~]# node -v
v8.17.0
[root@WzcWyt ~]# npm -v
6.13.4
遇到问题4
[root@WzcWyt bin]# ./stf doctor
2021-11-10T08:30:35.373Z INF/cli:doctor 824283 [*] OS Arch: x64
2021-11-10T08:30:35.375Z INF/cli:doctor 824283 [*] OS Platform: linux
2021-11-10T08:30:35.375Z INF/cli:doctor 824283 [*] OS Platform: 4.18.0-240.22.1.el8_3.x86_64
2021-11-10T08:30:35.375Z INF/cli:doctor 824283 [*] Using Node 8.17.0
2021-11-10T08:30:35.414Z ERR/cli:doctor 824283 [*] Unexpected error checking ZeroMQ: Error: libzmq.so.5: cannot open shared object file: No such file or directory
2021-11-10T08:30:35.415Z INF/cli:doctor 824283 [*] Using GraphicsMagick 1.3.36
2021-11-10T08:30:35.415Z INF/cli:doctor 824283 [*] Using ProtoBuf 3.19.1
2021-11-10T08:30:35.415Z INF/cli:doctor 824283 [*] Using ADB 1.0.41
2021-11-10T08:30:35.543Z INF/cli:doctor 824283 [*] Using RethinkDB 2.4.1
[root@WzcWyt bin]#
解决办法
参考
[root@WzcWyt /]# find / -name libzmq.so.5
/usr/local/lib/libzmq.so.5
/usr/local/zeromq-4.3.4/src/.libs/libzmq.so.5
[root@WzcWyt /]# vim /etc/ld.so.conf
include ld.so.conf.d/*.conf
# 追加以下路径
/usr/local/lib/
# 生效
[root@WzcWyt /]# ldconfig
# 再次执行./stf doctor成功
[root@WzcWyt /]# cd /usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/bin/
[root@WzcWyt bin]# ./stf doctor
2021-11-10T08:39:55.535Z INF/cli:doctor 824337 [*] OS Arch: x64
2021-11-10T08:39:55.537Z INF/cli:doctor 824337 [*] OS Platform: linux
2021-11-10T08:39:55.537Z INF/cli:doctor 824337 [*] OS Platform: 4.18.0-240.22.1.el8_3.x86_64
2021-11-10T08:39:55.538Z INF/cli:doctor 824337 [*] Using Node 8.17.0
2021-11-10T08:39:55.564Z INF/cli:doctor 824337 [*] Using ZeroMQ 4.3.4
2021-11-10T08:39:55.580Z INF/cli:doctor 824337 [*] Using RethinkDB 2.4.1
2021-11-10T08:39:55.581Z INF/cli:doctor 824337 [*] Using GraphicsMagick 1.3.36
2021-11-10T08:39:55.581Z INF/cli:doctor 824337 [*] Using ProtoBuf 3.19.1
2021-11-10T08:39:55.581Z INF/cli:doctor 824337 [*] Using ADB 1.0.41
[root@WzcWyt bin]#
遇到问题5
[root@WzcWyt bin]# ./stf local --public-ip 59.110.171.91 --allow-remote
2021-11-10T09:14:54.053Z INF/util:procutil 824480 [*] Forking "/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/cli migrate"
2021-11-10T09:14:54.273Z INF/db 824486 [*] Connecting to 127.0.0.1:28015
2021-11-10T09:14:54.282Z INF/db 824486 [*] Unable to connect to 127.0.0.1:28015
2021-11-10T09:14:54.283Z FTL/db 824486 [*] No hosts left to try
2021-11-10T09:14:54.283Z FTL/util:lifecycle 824486 [*] Shutting down due to fatal error
/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/node_modules/bluebird/js/main/promise.js:680
throw e;
^
ExitError: Exit code "1"
at ChildProcess.<anonymous> (/usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/lib/util/procutil.js:49:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
解决办法:先启动rethinkdb
[root@WzcWyt bin]# rethinkdb
Recursively removing directory /usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/bin/rethinkdb_data/tmp
Initializing directory /usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/bin/rethinkdb_data
Running rethinkdb 2.4.1 (CLANG 9.0.1 (Red Hat 9.0.1-2.module_el8.2.0+309+0c7b6b03))...
Running on Linux 4.18.0-240.22.1.el8_3.x86_64 x86_64
Loading data from directory /usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/bin/rethinkdb_data
Listening for intracluster connections on port 29015
Listening for client driver connections on port 28015
error: Could not bind to http port: The address at localhost:8080 is reserved or already in use.
# 上面端口号冲突=====================================
# 这里指定端口号启动rethinkdb
[root@WzcWyt bin]# rethinkdb --bind all --cache-size 8192 --http-port 8081
Running rethinkdb 2.4.1 (CLANG 9.0.1 (Red Hat 9.0.1-2.module_el8.2.0+309+0c7b6b03))...
Running on Linux 4.18.0-240.22.1.el8_3.x86_64 x86_64
Loading data from directory /usr/local/node-v8.17.0-linux-x64/lib/node_modules/stf/bin/rethinkdb_data
warn: Cache size is larger than available memory.
Listening for intracluster connections on port 29015
Listening for client driver connections on port 28015
Listening for administrative HTTP connections on port 8081
Listening on cluster addresses: 127.0.0.1, 172.17.212.213, ::1, fe80::216:3eff:fe16:bdeb%2
Listening on driver addresses: 127.0.0.1, 172.17.212.213, ::1, fe80::216:3eff:fe16:bdeb%2
Listening on http addresses: 127.0.0.1, 172.17.212.213, ::1, fe80::216:3eff:fe16:bdeb%2
Server ready, "WzcWyt_iis" 2055f083-2b4a-4269-8be0-f1e46264df65












被折叠的 条评论
为什么被折叠?



