Closed why520crazy closed 8 years ago
perfect, thanks!!!
Hi, I am new at GitHub, so I don't understand how to read issues. I have open the link (Failed at the lame@1.2.3 install script 'node-gyp rebuild'. #62) but the people there just post "+1". I am having the same problem right now, how do I fix it?
Try npm install nan first. I had the same issue and below command solved it for me.
npm install nan@latest
nan@2.7.0 is actually installed
So what is the resolution here? I am getting same compile errors in npm install using node 6.9.1 and 6.12.0 on OS X...
I solved it now use version 2.3.0
, can you try upgrade?
@why520crazy - how did you solve this exactly - can you provide steps? npm install nan
installs nan 2.8.0 but it does not fix the compilation errors in node-gyp.
@andpor I do not remember the details steps, but i'm sure i did not install nan
, we use "iconv": "^2.3.0"
and node 6.x
or 8.x
now, no errors in the installation.
@andpor you can try upgrade node
to version 8.9.1
or 6.12.0
.
@andpor try npm install
after delete node_modules
folder.
not working on aws-linux
> node-gyp rebuild
make: Entering directory `/var/task/node_modules/iconv/build'
CXX(target) Release/obj.target/iconv/src/binding.o
CC(target) Release/obj.target/iconv/deps/libiconv/lib/iconv.o
CC(target) Release/obj.target/iconv/support/localcharset.o
SOLINK_MODULE(target) Release/obj.target/iconv.node
/usr/bin/ld: /usr/bin/ld: cannot execute binary file
collect2: error: ld returned 126 exit status
make: *** [Release/obj.target/iconv.node] Error 1
make: Leaving directory `/var/task/node_modules/iconv/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/var/lang/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.9.93-linuxkit-aufs
gyp ERR! command "/var/lang/bin/node" "/var/lang/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/task/node_modules/iconv
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/sane/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iconv@2.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iconv@2.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/2018-08-15T04_23_02_295Z-debug.log```
Try npm install nan first. I had the same issue and below command solved it for me.
npm install nan@latest
nan@2.7.0 is actually installed
This also worked for me even after windows-build-tools failed. I have no idea why, but it did the job.
Thanks!!
upgrade node 6.0, npm install ERROR "node-gyp rebuild"
run
npm install iconv
afternpm install node-gyp@3.3.1 -g
, the error as