install fibers on CentOS 7.6(aarch64) error
OwenSharpKing opened this issue · 12 comments
npm ERR! Linux 4.14.0-115.el7a.0.1.aarch64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "fibers"
npm ERR! node v6.16.0
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@4.0.1 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers@4.0.1 install script 'node build.js || nodejs build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js || nodejs build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs fibers
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
Is node
in your $PATH?
Is
node
in your $PATH?
I install npm by 'yum', node was installed on the same time.
# node -v
v6.16.0
# npm -v
3.10.10
Did you try this suggestion from the README: "If you are running nodejs v6.x then you will need to use npm install fibers@2
."
I try to install fiber@2, get error again on the same.
I try to install fiber@2, get error again on the same.
# npm install fibers@2 -l
\
> fibers@2.0.2 install /root/node_modules/fibers
> node build.js || nodejs build.js
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-g
yp/4.9.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/root/node_modules/fiber
s/.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: unable to verify the first certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1065:38)
gyp ERR! stack at emitNone (events.js:67:13)
gyp ERR! stack at TLSSocket.emit (events.js:166:7)
gyp ERR! stack at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishIni
t (_tls_wrap.js:623:8)
gyp ERR! stack at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhands
hakedone (_tls_wrap.js:453:38)
gyp ERR! System Linux 4.14.0-115.el7a.0.1.aarch64
gyp ERR! command "/root/deploy/node-v4.9.1-linux-arm64/bin/node" "/root/deploy/node-v4.9.
1-linux-arm64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--re
lease"
gyp ERR! cwd /root/node_modules/fibers
gyp ERR! node -v v4.9.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
Alpine users please run: `sudo apk add python make g++`
sh: nodejs: command not found
npm ERR! Linux 4.14.0-115.el7a.0.1.aarch64
npm ERR! argv "/root/deploy/node-v4.9.1-linux-arm64/bin/node" "/root/deploy/node-v4.9.1-l
inux-arm64/bin/npm" "install" "fibers@2" "-l"
npm ERR! node v4.9.1
npm ERR! npm v2.15.11
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@2.0.2 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers@2.0.2 install script 'node build.js || nodejs build.js'.
npm ERR! This is most likely a problem with the fibers package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js || nodejs build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs fibers
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls fibers
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
The output of that log is from node v4.9.1.. but earlier you said you were on node v6.16.0. If you want to install on 4.x you need to use npm install fibers@1
but at that point you're going far back enough in time where fibers is the least of your concerns.
I suspect that the crux of this issue is that node is not in your $PATH and/or there is a shell alias taking precedence. You can confirm by running which node
and alias node
. I think this kind of thing is common with package managers.
I try several different ways to install fibers on CentOS 7.6 (aarch64).
First time I install npm by "yum install npm". Then node is v6.16.0 and npm is 3.10.10 .
Second time I install npm by compile nodejs v4.9.1 source code for aarch64, so node is v4.9.1.
Both of them get the same error log.
I didn't know why it tells me "Stack Error: unable to verify the first certificate". There is not proxy.
# npm install fibers
> fibers@4.0.1 install /root/node_modules/fibers
> node build.js || nodejs build.js
make: Entering directory `/root/node_modules/fibers/build'
CXX(target) Release/obj.target/fibers/src/fibers.o
CXX(target) Release/obj.target/fibers/src/coroutine.o
CC(target) Release/obj.target/fibers/src/libcoro/coro.o
SOLINK_MODULE(target) Release/obj.target/fibers.node
COPY Release/fibers.node
make: Leaving directory `/root/node_modules/fibers/build'
Installed in `/root/node_modules/fibers/bin/linux-arm64-48-glibc/fibers.node`
/root
└── fibers@4.0.1
npm WARN enoent ENOENT: no such file or directory, open '/root/package.json'
npm WARN root No description
npm WARN root No repository field.
npm WARN root No README data
npm WARN root No license field.
On another CentOS install fibers success! There is make operation.
Is that C code or C++ code ?
Maybe I need to install gcc or another compile tool to fix this problem ?
fibers includes precompiled binaries so people usually don't need to compile it. This is all mentioned in the README under "supported platforms". The two error logs you've posted are attempting to install fibers@4 on nodejs 6.x (you should use fibers@2) and fibers@2 on nodejs 4.x (you should use fibers@1).
node-gyp is throwing certificate errors at you. You will definitely want to get those resolved because node-gyp needs to download headers for your specific version of nodejs.
Additionally you can pass the --loglevel verbose
flag to install to get more information.
FWIW, I deleted node/npm entirely, reinstalled, and I wasn't facing this issue anymore.