node-icu-charset-detector icon indicating copy to clipboard operation
node-icu-charset-detector copied to clipboard

I am unable to install this package

Open drogars opened this issue 8 years ago • 5 comments

I originally discovered this issue when attempting to set up Hubot with an IRC adapter on Windows 10. Hubot isn't really officially supported on Windows 10, so I chalked up the problem to the platform. So I switched to Ubuntu 16. When I get to this stage in the Hubot instructions: yo hubot, it starts the process of getting everything needed for Hubot, apparently that includes this package. When it attempts to install this package you get the following error:

iconv.target.mk:109: recipe for target 'Release/obj.target/iconv/src/binding.o' failed make: *** [Release/obj.target/iconv/src/binding.o] Error 1 make: Leaving directory '/home/jadzia/jadzia/node_modules/iconv/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) gyp ERR! System Linux 4.4.0-21-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/jadzia/jadzia/node_modules/iconv gyp ERR! node -v v6.4.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN install:[email protected] [email protected] install: node-gyp rebuild npm WARN install:[email protected] Exit status 1

[email protected] install /home/jadzia/jadzia/node_modules/node-icu-charset-detector node-gyp rebuild

make: Entering directory '/home/jadzia/jadzia/node_modules/node-icu-charset-detector/build' CXX(target) Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o ../node-icu-charset-detector.cpp:5:28: fatal error: unicode/ucsdet.h: No such file or directory compilation terminated. node-icu-charset-detector.target.mk:90: recipe for target 'Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o' failed make: *** [Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o] Error 1 make: Leaving directory '/home/jadzia/jadzia/node_modules/node-icu-charset-detector/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) gyp ERR! System Linux 4.4.0-21-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/jadzia/jadzia/node_modules/node-icu-charset-detector gyp ERR! node -v v6.4.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN install:[email protected] [email protected] install: node-gyp rebuild npm WARN install:[email protected] Exit status 1 [email protected] /home/jadzia/jadzia

drogars avatar Aug 26 '16 14:08 drogars

Then I assumed that the problem was with the IRC adapter. Since it isn't officially support, I switched to the shell adapter and get the same error. Then, I simply tried to install this package directly:

sudo npm install node-icu-charset-detector and I get this series of errors: iconv.target.mk:109: recipe for target 'Release/obj.target/iconv/src/binding.o' failed make: *** [Release/obj.target/iconv/src/binding.o] Error 1 make: Leaving directory '/home/jadzia/jadzia/node_modules/iconv/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) gyp ERR! System Linux 4.4.0-21-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/jadzia/jadzia/node_modules/iconv gyp ERR! node -v v6.4.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN install:[email protected] [email protected] install: node-gyp rebuild npm WARN install:[email protected] Exit status 1

[email protected] install /home/jadzia/jadzia/node_modules/irc/node_modules/node-icu-charset-detector node-gyp rebuild

make: Entering directory '/home/jadzia/jadzia/node_modules/irc/node_modules/node-icu-charset-detector/build' CXX(target) Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o ../node-icu-charset-detector.cpp:5:28: fatal error: unicode/ucsdet.h: No such file or directory compilation terminated. node-icu-charset-detector.target.mk:90: recipe for target 'Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o' failed make: *** [Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o] Error 1 make: Leaving directory '/home/jadzia/jadzia/node_modules/irc/node_modules/node-icu-charset-detector/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) gyp ERR! System Linux 4.4.0-21-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/jadzia/jadzia/node_modules/irc/node_modules/node-icu-charset-detector gyp ERR! node -v v6.4.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN install:[email protected] [email protected] install: node-gyp rebuild npm WARN install:[email protected] Exit status 1

[email protected] install /home/jadzia/jadzia/node_modules/node-icu-charset-detector node-gyp rebuild

make: Entering directory '/home/jadzia/jadzia/node_modules/node-icu-charset-detector/build' CXX(target) Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o ../node-icu-charset-detector.cpp:7:28: fatal error: unicode/ucsdet.h: No such file or directory compilation terminated. node-icu-charset-detector.target.mk:92: recipe for target 'Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o' failed make: *** [Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o] Error 1 make: Leaving directory '/home/jadzia/jadzia/node_modules/node-icu-charset-detector/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) gyp ERR! System Linux 4.4.0-21-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/jadzia/jadzia/node_modules/node-icu-charset-detector gyp ERR! node -v v6.4.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm ERR! Linux 4.4.0-21-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-icu-charset-detector" npm ERR! node v6.4.0 npm ERR! npm v3.10.6 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'. 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 node-icu-charset-detector package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs node-icu-charset-detector npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls node-icu-charset-detector npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/jadzia/jadzia/npm-debug.log

I have attached the npm-debug.log in case it's helpful. Any suggestions would be appreciated.
npm-debug.txt

drogars avatar Aug 26 '16 14:08 drogars

Having the same problem!

demiters avatar Sep 23 '16 05:09 demiters

I partially solve it using the following steps:

  1. removing the folder of node-gyp: rm -R /home/userName/.node-gyp 2.- Installing manually the library: node install -g node-gyp

Hopes help...

aolite avatar Oct 06 '16 13:10 aolite

From the instructions on the first page, install this first and it should install.

apt-get install libicu-dev

wbaleson avatar Feb 13 '17 03:02 wbaleson

For those running CentOS, installing libicu-devel via yum and removing the ~/.node-gyp directory did the trick.

nicholatian avatar Mar 18 '18 12:03 nicholatian