nodejs 서버에 시간을 설치하려고하면 아래 오류가 발생합니다.
time@0.8.4 install /var/www/track/node_modules/time
node-gyp rebuild
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/lib/nodejs/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/lib/nodejs/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/lib/nodejs/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (fs.js:297:15)
gyp ERR! System Linux 3.2.0-31-virtual
gyp ERR! command "node" "/usr/lib/nodejs/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/track/node_modules/time
gyp ERR! node -v v0.8.15
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
npm ERR! time@0.8.4 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the time@0.8.4 install script.
npm ERR! This is most likely a problem with the time 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 time
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.2.0-31-virtual
npm ERR! command "nodejs" "/usr/bin/npm" "install" "time"
npm ERR! cwd /var/www/track
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/track/npm-debug.log
npm ERR! not ok code 0
답변
어떤 OS를 사용하고 있습니까?
Ubuntu 인 경우 빌드 필수 패키지를 설치해야합니다.
$ sudo apt-get install build-essential
그런 다음 패키지를 다시 설치하십시오.
답변
간단한 해결책 :
sudo apt-get install build-essential
다시 시도하십시오
답변
CENTOS 7 및 RHEL 7 기본 이미지 모두에서 Docker를 사용하는 것과 동일한 문제가 발생했습니다. 다음을 수행하십시오.
RUN yum install -y make gcc*
나를 위해 완벽하게 일했습니다!
답변
Windows 및 npm을 사용하는 경우 cmd (관리자)를 통해 설치하십시오.
npm install --global --production windows-build-tools
답변
Manjaro / Arch Linux의 경우 make 및 gcc를 설치해야합니다.
sudo pacman -S make gcc
답변
