I am trying to install libxmljs on Ubuntu Server 12
I ran the following command
sudo npm install libxmljs
and i get the following error.
npm http GET https://registry.npmjs.org/libxmljs
npm http 304 https://registry.npmjs.org/libxmljs
npm http GET https://registry.npmjs.org/bindings/1.1.1
npm http GET https://registry.npmjs.org/nan/1.1.2
npm http 304 https://registry.npmjs.org/nan/1.1.2
npm http 304 https://registry.npmjs.org/bindings/1.1.1
> libxmljs#0.10.0 install /home/xxx/node_modules/libxmljs
> node-gyp rebuild
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/sysadmin/node_modules/libxmljs
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! weird error 1
npm ERR! not ok code 0
Please help.
I had a similar problem and could fix it with. Probably the binary name changed from nodejs to node in a more recent version.
ln -s /usr/bin/nodejs /usr/local/bin/node
Related
I have had no issues with installing modules up until now, and I'm not sure what went wrong, as I haven't changed my workflow at all.
I ran:
npm i --save mariadb
in the root directory of my Node project. Then I imported this module:
const mariadb = require("mariadb")
When I try to run, though, I get
Error: Cannot find module 'mariadb'
Looking in node_modules, mariadb indeed is in there, but then looking in package.json, mariadb is not listed in dependencies. I then tried running
npm install --save mariadb
in the src directory to same effect. Then tried
npm install -g mariadb
to same effect. Then tried
rm -rf node_modules
npm install
Same effect, and I also get this error (I assume it must be related somehow):
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.4.0
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 /Users/codyray/github.com/cody-a-ray/neighbors/client/node_modules/fsevents
gyp ERR! node -v v12.14.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
> core-js#2.6.11 postinstall /Users/codyray/github.com/cody-a-ray/neighbors/client/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
Also, after that last command, every package.json file has the following error:
Problems loading reference 'https://schemastore.azurewebsites.net/schemas/json/package.json': Unable to load schema from 'https://schemastore.azurewebsites.net/schemas/json/package.json': getaddrinfo ENOTFOUND schemastore.azurewebsites.net.
I have no idea what any of this means. Seems very cryptic.
I then tried just manually adding mariadb to my package.json and running
npm install --save
again, to no effect.
God help me
Maybe you should try
npm install mariadb --save
I see you are putting in the wrong order, for more information run this command on your console:
npm help install
I am trying to compile my sass with gulp but when I try the command (in my project):
gulp init it gives me the error message:
Local gulp not found in ~/Desktop/templateWebsite
[09:01:31] Try running: npm install gulp
I have the gulp CLI gobaly installed but it still does not work.
sudo npm install -g gulp-cli
I found some possible solutions on Stack Overflow but they didn't work. Also I tried different version of gulp CLI.
i also tryed to install gulp localy:
sebastians-mbp:templateWebsite sebastiantramper$ sudo npm install gulp
Password:
> fsevents#1.2.7 install /Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents
> node install
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for fsevents#1.2.7 and node#11.6.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/build'
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:188:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 17.5.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents
node-pre-gyp ERR! node -v v11.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
npm WARN saveError ENOENT: no such file or directory, open '/Users/sebastiantramper/Desktop/templateWebsite/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/sebastiantramper/Desktop/templateWebsite/package.json'
npm WARN templateWebsite No description
npm WARN templateWebsite No repository field.
npm WARN templateWebsite No README data
npm WARN templateWebsite No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ gulp#4.0.0
I am following this tutorial to install PeP proxy.
I have installed both node and npm on my CentOS 6.7:
[root#centos fi-ware-pep-proxy]# node -v
v0.10.41
[root#centos fi-ware-pep-proxy]# npm -v
1.4.29
But when I get into the fi-ware-pep-proxy folder and and run npm install, I get the following error:
[root#centos fi-ware-pep-proxy]# npm install
npm WARN deprecated This version of npm lacks support for important features,
npm WARN deprecated such as scoped packages, offered by the primary npm
npm WARN deprecated registry. Consider upgrading to at least npm#2, if not the
npm WARN deprecated latest stable version. To upgrade to npm#2, run:
npm WARN deprecated
npm WARN deprecated npm -g install npm#latest-2
npm WARN deprecated
npm WARN deprecated To upgrade to the latest stable version, run:
npm WARN deprecated
npm WARN deprecated npm -g install npm#latest
npm WARN deprecated
npm WARN deprecated (Depending on how Node.js was installed on your system, you
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if
npm WARN deprecated on Windows, run them from an Administrator prompt.)
npm WARN deprecated
npm WARN deprecated If you're running the version of npm bundled with
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS
npm WARN deprecated will be bundled with a version of npm#2, which has some small
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and
npm WARN deprecated semver behavior.
-
> node-expat#2.1.4 install /root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat
> node-gyp rebuild
make: Entering directory `/root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat/build'
CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlparse.o
make: cc: Command not found
make: *** [Release/obj.target/expat/deps/libexpat/lib/xmlparse.o] Error 127
make: Leaving directory `/root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 2.6.32-573.8.1.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/fi-ware-pep-proxy/node_modules/xml2json/node_modules/node-expat
gyp ERR! node -v v0.10.41
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! node-expat#2.1.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat#2.1.4 install script.
npm ERR! This is most likely a problem with the node-expat 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 their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-573.8.1.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /root/fi-ware-pep-proxy
npm ERR! node -v v0.10.41
npm ERR! npm -v 1.4.29
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
I tried looking for expat-devel which I also yum installed, but the error remains the same.
I also checked my python version and saw that it is:
[root#centos fi-ware-pep-proxy]# python -V
Python 2.6.6
Does anyone have a clue how I can solve this issue?
Thanks to #Álvaro Alonso I came to the conclusion that I should install gcc:
sudo yum install gcc gcc-c++
as explained here:
https://www.vultr.com/docs/how-to-install-gcc-on-centos-6
Thank you!
I am working with Node.js, Express.js and sqlite3 to create a small website.
I have developed my project in Ubuntu and I have been trying to get it to work in Mac also.
But after I svn checkout from my repository the folder of the project, and try to run my app.js file I get the following error:
module.js:356
Module._extensions[extension](this, filename);
^
Error: dlopen(/Users/cs205g1s13/BS/baby_skype_less/node_modules/sqlite3/build/Release/node_sqlite3.node, 1): no suitable image found. Did find:
/Users/cs205g1s13/BS/baby_skype_less/node_modules/sqlite3/build/Release/node_sqlite3.node: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/cs205g1s13/BS/baby_skype_less/node_modules/sqlite3/lib/sqlite3.js:1:104)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
The website works fine on Ubuntu. And also, the Mac computer has Node.js, sqlite3. Any help of why this is happening would be appreciated.
I removed the node_modules from my svn repository, and svn checkout my project folder into a mac computer. When I do npm install sqlite3 I get the following errors:
$ npm install sqlite3
npm WARN package.json application-name#0.0.1 No README.md file found!
npm http GET https://registry.npmjs.org/sqlite3
npm http 304 https://registry.npmjs.org/sqlite3
sqlite3#2.1.7 install /Users/cs205g1s13/BS/playing/node_modules/sqlite3
node-gyp rebuild
Traceback (most recent call last):
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp", line 15, in <module>
import gyp
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 8, in <module>
import gyp.input
File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 15, in <module>
import multiprocessing
ImportError: No module named multiprocessing
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:415:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR! System Darwin 11.4.2
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node- gyp.js" "rebuild"
gyp ERR! cwd /Users/cs205g1s13/BS/playing/node_modules/sqlite3
gyp ERR! node -v v0.10.4
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! sqlite3#2.1.7 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the sqlite3#2.1.7 install script.
npm ERR! This is most likely a problem with the sqlite3 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 their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 11.4.2
npm ERR! command "node" "/usr/local/bin/npm" "install" "sqlite3"
npm ERR! cwd /Users/cs205g1s13/BS/playing
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/cs205g1s13/BS/playing/npm-debug.log
npm ERR! not ok code 0
Did you check in your node_modules folder into svn? Don't do that. To fix it, run npm rebuild on your Ubuntu box. sqlite uses extensions that must be compiled on the host platform.
I'm trying to install a mysql node package on Mac OS X. I'm trying to run a client project locally.
I have node and npm installed already and they work fine, other packages have installed fine. I've also compiled/installed the full LAMP stack.
When the build below fails, I'm not seeing any error messages that are helpful - just information about a library not being found. Without knowing what it can't find, I can't fix it.
Any advice? MySQL has been installed the standard way - downloaded packages, ./configure'd, make/install.
$ npm install mysql-libmysqlclient
npm http GET https://registry.npmjs.org/mysql-libmysqlclient
npm http 304 https://registry.npmjs.org/mysql-libmysqlclient
> mysql-libmysqlclient#1.3.3 install /Users/botskonet/node_modules/mysql-libmysqlclient
> node-gyp rebuild
info it worked if it ends with ok
spawn python [ '/Users/botskonet/.node-gyp/0.6.12/tools/gyp_addon',
'binding.gyp',
'-I/Users/botskonet/node_modules/mysql-libmysqlclient/build/config.gypi',
'-f',
'make' ]
spawn make [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings.o
CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_connection.o
CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_result.o
CXX(target) Release/obj.target/mysql_bindings/src/mysql_bindings_statement.o
SOLINK_MODULE(target) Release/mysql_bindings.node
ld: library not found for -lmysqlclient_r
collect2: ld returned 1 exit status
make: *** [Release/mysql_bindings.node] Error 1
ERR! Error: `make` failed with exit code: 2
at Array.0 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:176:25)
at EventEmitter._tickCallback (node.js:192:40)
ERR! not ok
npm ERR! mysql-libmysqlclient#1.3.3 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the mysql-libmysqlclient#1.3.3 install script.
npm ERR! This is most likely a problem with the mysql-libmysqlclient 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 their info via:
npm ERR! npm owner ls mysql-libmysqlclient
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Darwin 11.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "mysql-libmysqlclient"
npm ERR! cwd /Users/botskonet/Sites/SportsBuddies
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.15
npm ERR! code ELIFECYCLE
npm ERR! message mysql-libmysqlclient#1.3.3 install: `node-gyp rebuild`
npm ERR! message `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/botskonet/Sites/SportsBuddies/npm-debug.log
npm not ok
Look at the dependencies section in README and issues #107. To build mysql-libmysqlclient you should install both libmysqlclient and development headers for it, add path to your MySQL bin dir to $PATH and path to your MySQL lib dir to $DYLD_LIBRARY_PATH.