2013-02-08 11 views
52

Quando provo a installare il tempo sul server di nodejs ottengo l'errore qui sotto:npm non è riuscito a installare il tempo con make non trovato errore

[email protected] 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! [email protected] install: `node-gyp rebuild` 
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1 
npm ERR! 
npm ERR! Failed at the [email protected] 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 
+0

Si prega di aggiornare questo post per mostrare quale sistema operativo si sta utilizzando. La risposta attuale è valida per Ubuntu, tuttavia sarebbe utile per gli altri se si chiarisse il proprio tipo di sistema operativo. – JnL

risposta

192

Quale sistema operativo stai usando?

Se si tratta di Ubuntu è necessario installare il pacchetto build-essential:

$ sudo apt-get install build-essential 

tentare di installare nuovamente il pacchetto.

+0

ha risolto il mio problema! – temple

+1

La risposta è corretta per un sistema operativo Ubuntu. – JnL

+0

Sto affrontando lo stesso problema con MAC OS. Per favore, guidami come configurarlo per MAC. – Learner

7

Ho avuto lo stesso problema utilizzando Docker, sia su CentOS e RHEL 7 7 immagini di base ... effettuare le seguenti operazioni:

RUN yum install -y make gcc* 

ha funzionato perfettamente per me!

+1

Immagino che tu mi abbia appena risparmiato un po 'di tempo. Grazie! Ho provato senza 'gcc *' ma non ha funzionato. CENTOS 7 – Bill

+0

Grazie, ha lavorato per me in centos '7.3.1611' –

+1

Grazie mille, dopo più di 2 anni da questo post. Mi ha salvato la giornata !! –

Problemi correlati