2017-12-12 4 views
0

ich nicht mit npm Installieren von Paketen nach $ npm installieren erfolgreich sein kann, zeigt diese Ausgabe:npm installieren Fehler gibt

> [email protected] install /home/samuel/testes/Avanade Angular Academy by Gama/gama-avanade-tryout01/node_modules/canvas 
> node-gyp rebuild 

./util/has_lib.sh: 31: ./util/has_lib.sh: pkg-config: not 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 (/home/samuel/.npm-global/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:219:12) 
gyp ERR! System Linux 4.9.0-4-amd64 
gyp ERR! command "/usr/bin/node" "/home/samuel/.npm-global/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /home/samuel/testes/Avanade Angular Academy by Gama/gama-avanade-tryout01/node_modules/canvas 
gyp ERR! node -v v6.12.0 
gyp ERR! node-gyp -v v3.6.2 
gyp ERR! not ok 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] 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/samuel/.npm/_logs/2017-12-12T02_40_55_700Z-debug.log 

Was soll ich tun? Danke für alle Hilfe!

+0

"Ein komplettes Protokoll dieses Laufs finden Sie in: /home/samuel/.npm/_logs/2017-12-12T02_40_55_700Z-debug.log" ... – alfasin

Antwort

0

Die Lösung besteht darin, einige externe Abhängigkeiten zu installieren. Die folgenden Befehle waren genug.

$ sudo apt-get update $ sudo apt-get install libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g ++

Nach diesem npm $ Werke installieren!