$ npm install odbc
odbc#2.2.2 install /home/user/project/node_modules/odbc
node-gyp configure build
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:167:21)
gyp ERR! System Linux 5.4.0-29-generic
gyp ERR! command "/home/user.nvm/versions/node/v12.16.3/bin/node" "/home/user/.nvm/versions/node/v12.16.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/user/GASC-RET/node_modules/odbc
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! odbc#2.2.2 install: node-gyp configure build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the odbc#2.2.2 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! /home/user/.npm/_logs/2020-05-07T22_19_29_684Z-debug.log
****I ensured below command is executed first, although when I type unixodbc -v I don't get anything back..****
~$ sudo apt install unixodbc unixodbc-dev
Building dependency tree
Reading state information... Done
unixodbc-dev is already the newest version (2.3.6-0.1build1).
unixodbc is already the newest version (2.3.6-0.1build1).
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
***this is my first time configuring Ubuntu for my app and I'm sure I'm missing steps, but can't find a proper step by step online to follow*****
turns out I was missing Ubuntu-make (below snipped is from official site, explaining what "make" does. I was able to install it via sudo apt install build-essential; which installs "make" among other packages. I could have also gone with sudo apt install make.
https://wiki.ubuntu.com/ubuntu-make
Ubuntu Make is a command line tool which allows you to download the latest version of popular developer tools on your installation, installing it alongside all of the required dependencies (which will only ask for root access if you don't have all the required dependencies installed already), enable multi-arch on your system if you are on a 64 bit machine, integrate it with the Unity launcher. Basically, one command to get your system ready to develop with!
Related
first of all thanks for the help.
I have a Node js API REST, i use Express, fs module, sharp for images and many others, everything works fine in my machine, and i wanted to test this API in a shared hosting that i purchased months ago.
i have my app in my folder, the node js create app from CPANEL Recognizes my JSON file, when i click NPM INSTALL this is the error that comes up:
npm WARN lifecycle The node binary used for scripts is /home/webfoqgo/nodevenv/server/12/bin/node but npm is using /opt/alt/alt-nodejs12/root/usr/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
ERR! sharp Use with glibc 2.12 requires manual installation of libvips >= 8.10.0
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
make: execvp: cc: Permission denied
make: *** [Release/obj.target/nothing/../node-addon-api/nothing.o] Error 127
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/alt/alt-nodejs12/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 2.6.32-954.3.5.lve1.4.77.el6.x86_64
gyp ERR! command "/opt/alt/alt-nodejs12/root/usr/bin/node" "/opt/alt/alt-nodejs12/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/webfoqgo/nodevenv/server/12/lib/node_modules/sharp
gyp ERR! node -v v12.19.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN building-backend#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.1 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp#0.26.3 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp#0.26.3 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! /home/webfoqgo/.npm/_logs/2021-01-27T20_32_15_794Z-debug.log
i tried 2 things:
1.- i made a .npmrc file in my project root like this:
2.- i deleted the SHARP dependency from my package.json -- this makes the process of NPM INSTALL in cpanel go well, no error, but do need sharp in my project so deleting it is not a viable option for production.
Links that i have checked:
StackOverflow question.
have anybody came across this sometime?
Thank you very much.
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 (/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/Users/synapse/.nvm/versions/node/v8.8.0/bin/node" "/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/synapse/Documents/synapsefi-dev-ui/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v8.8.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm WARN synapsefi-dev-ui#2.0.20 No repository field.
npm WARN The package country-data is included as both a dev and production dependency.
npm WARN The package react-dropzone is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 (node_modules/watchpack/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 in
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 (/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/Users/synapse/.nvm/versions/node/v8.8.0/bin/node" "/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/synapse/Documents/synapsefi-dev-ui/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v8.8.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm WARN synapsefi-dev-ui#2.0.20 No repository field.
npm WARN The package country-data is included as both a dev and production dependency.
npm WARN The package react-dropzone is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 (node_modules/watchpack/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.11 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
stall: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
The repository node-gyp contains a dedicated troubleshooting guide for macOS Catalina:
https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md
TLDR:
Installation notes for macOS Catalina (v10.15)
Both upgrading to macOS Catalina and running a Software Update in
Catalina may cause normal node-gyp installations to fail. This might
manifest as the following error during npm install:
gyp: No Xcode or CLT version detected!
Solutions
There are three ways to install the Xcode libraries node-gyp needs on
macOS. People running Catalina have had success with some but not
others in a way that has been unpredictable.
With the full Xcode (~7.6 GB download) from the App Store app.
With the much smaller Xcode Command Line Tools via xcode-select --install
With the much smaller Xcode Command Line Tools via manual download.
Go to your finder and type in "Terminal" to open the Terminal app.
Copy and paste: sudo rm -rf /Library/Developer/CommandLineTools
push enter
*you have now manually removed your command line tools
then go to https://developer.apple.com/download/more/ and search "Command Line Tools for Xcode 11.3.1"
Click it and then download it
*you have now manually added a command line tools set
**Note: My Macbook Pro then kept telling me to update my command lines software. I ended up updating my software to Command Line Tools for Xcode 12.2 and it still works. I would recommend trying to update your Command Line Tools if your computer settings says it's available. If not, do the steps I just mentioned and it should work :slight_smile:
try running the command npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass, My problem was fixed by changing the source of node-sass.
I'm new to node and a bit out of my depth here. Experiencing this error on both Mac OS X and Centos 6. Happens in all the npm install xxx commands I've tried. Any suggestions on how to get around this error much appreciated.
Similar to npm install gives node-gyp error but I do not have spaces in my username which is what solved his issue.
npm install canvas
> canvas#1.6.6 install /home/test1/ng2-webpack-demo/node_modules/canvas
> node-gyp rebuild
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in
binding.gyp. 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/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
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:215:12)
gyp ERR! System Linux 2.6.32-642.4.2.el6.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 /home/test1/ng2-webpack-demo/node_modules/canvas
gyp ERR! node -v v6.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN #angular/animations#4.3.6 requires a peer of #angular/core#4.3.6 but
none was installed.
npm WARN #angular/material#2.0.0-beta.8 requires a peer of #angular/cdk#2.0.0-
beta.8 but none was installed.
npm WARN #angular/material#2.0.0-beta.8 requires a peer of
#angular/core#^4.0.0 but none was installed.
npm WARN #angular/material#2.0.0-beta.8 requires a peer of
#angular/common#^4.0.0 but none was installed.
npm WARN #ngtools/webpack#1.2.10 requires a peer of #angular/tsc-
wrapped#^0.5.0 but none was installed.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.2
(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current:
{"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas#1.6.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas#1.6.6 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! /home/test1/.npm/_logs/2017-08-29T15_54_58_848Z-debug.log
This is a known canvas issue, probably caused by missing native libs.
Try this see if it helps:
sudo npm uninstall -g node-gyp
sudo npm install -g node-gyp
brew install pkg-config cairo libpng jpeg giflib
npm i canvas
Source: https://github.com/Automattic/node-canvas/issues/913#issuecomment-368042394
I've same error the reason was that I don't have clang compiler installed.
My solution to this was to install build-essential package
sudo apt-get install build-essential
I'm using Ubuntu 20.1 release
I tried npm install zmq and I got:
make: Entering directory '/home/lucas/dir/node_modules/zmq/build'
CXX(target) Release/obj.target/zmq/binding.o
../binding.cc:28:17: fatal error: zmq.h: No such file or directory
compilation terminated.
zmq.target.mk:94: recipe for target 'Release/obj.target/zmq/binding.o' failed
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory '/home/lucas/dir/node_modules/zmq/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: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:215:12)
gyp ERR! System Linux 4.4.0-59-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/lucas/dir/node_modules/zmq
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN projectName#1.0.0 No repository field.
npm ERR! Linux 4.4.0-59-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "zmq"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! zmq#2.15.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq#2.15.3 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 zmq 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 zmq
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls zmq
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/lucas/dir/npm-debug.log
Here's the pastebin of that npm-debug.log:
http://pastebin.com/UGLDEWin
Does anybody have any idea of what's happening? Seems like error in the compilation or so. As you see, my nodejs is version 7.x, not an old one. And NPM is 4.x, should work, right?
Update on latest Ubuntu:
sudo apt-get install libtool pkg-config build-essential autoconf automake
sudo apt-get install libzmq3-dev
Try to:
sudo apt-get install build-essential checkinstall
then, relaunch npm install.
If it fails again, you can try to install node-gyp globally:
npm install -g node-gyp
installing on Unix/Mac:
First install pkg-config and the ZeroMQ library.
This module is compatible with ZeroMQ versions 2, 3 and 4. The installation process varies by platform, but headers are mandatory. Most Linux distributions provide these headers with -devel packages like zeromq-devel or zeromq3-devel. Homebrew for OS X provides versions 4 and 3 with packages zeromq and zeromq3, respectively. A Chris Lea PPA is available for Debian-like users who want a version newer than currently provided by their distribution
For windows
First install Visual Studio and either Node.js or io.js.
Ensure you're building zmq from a conservative location on disk, one without unusual characters or spaces, for example somewhere like: C:\sources\myproject.
Installing the ZeroMQ library is optional and not required on Windows. We recommend running npm install and node executable commands from a github for windows shell or similar environment.
https://www.npmjs.com/package/zmq
What worked for me to avoid the Error: `make` failed with exit code: 2 error after running sudo apt-get install libzmq3-dev along with making sure I had installed all of the packages from the other answers:
From the docs:
To use your system's libzmq (if it has been installed and development headers are available):
npm install zeromq#5 --zmq-external
I wanted to follow this page to run JSBin locally.
I just installed xcode 8.2 in my mac. Now, npm -v returns 3.10.9; node -v returns v7.2.1. However, npm install raised errors:
/Users/softtimur/Startup/WebProjects/jsbin$ npm install
> hashring#3.0.0 install /Users/softtimur/Startup/WebProjects/jsbin/node_modules/hashring
> node-gyp rebuild
CXX(target) Release/obj.target/hashvalue/src/hashvalue.o
In file included from ../src/hashvalue.cc:1:
../../nan/nan.h:189:68: error: too many arguments to function call, expected at most 2, have 4
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
...
...
...
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
13 warnings and 20 errors generated.
make: *** [Release/obj.target/hashvalue/src/hashvalue.o] Error 1
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:215:12)
gyp ERR! System Darwin 16.1.0
gyp ERR! command "/usr/local/Cellar/node/7.2.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/softtimur/Startup/WebProjects/jsbin/node_modules/hashring
gyp ERR! node -v v7.2.1
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN mocha-casperjs#0.5.8 requires a peer of casperjs#>= 1.1.0-beta3 but none was installed.
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/Cellar/node/7.2.1/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.2.1
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! hashring#3.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hashring#3.0.0 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 hashring 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 hashring
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls hashring
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/softtimur/Startup/WebProjects/jsbin/npm-debug.log
Does anyone know what's wrong here?
Downgrade Node to v10, like this:
brew uninstall node
brew install node#10
brew link --force --overwrite node#10
npm i should finish without errors now.
The problem is that hashring v3.0.0 depends on an older version of nan (v1.3.x), which is not compatible with recent versions of node. It should be noted that as of this writing, the current version of hashring (v3.2.0) no longer contains an addon, it's javascript only.
The hashring dependency comes from jsbin's memcached dependency, which is currently hard coded to a specific git commit hash. There was a PR to update this dependency a number of months ago but was apparently dismissed because the maintainer(s) are apparently not interested in supporting modern versions of node. You may want to create an issue on their tracker to voice your concern about node compatibility.