2015-09-25 69 views
0

我似乎無法在我的BeagleBone黑色上爲NODE.JS安裝SQLite3。 無論我做什麼,我都會根據自己的嘗試結束各種錯誤。 我已經閱讀並嘗試了堆棧溢出幾個線程無濟於事。npm在BeagleBone黑色上安裝sqlite3錯誤

最後一次嘗試我所做的就是運行

sudo npm install -g node-gyp, sudo apt-get install build-essential 
    sudo apt-get install python-software-properties python g++ make 

後,最後我跑

sudo npm install sqlite3 --build-from-source 

,但無濟於事和連接整個一天浪費我得到以下 - >

npm ERR! node v4.0.0 
npm ERR! npm v2.14.2 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install -- fallback-to-build'. 
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-pre-gyp install --fallback-to-build 
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! Please include the following file with any support request: 
npm ERR!  /home/debian/winShare/npm-debug.log 

這是我只要去 sudo npm install sqlite3

錯誤:

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:270:23) 
gyp ERR! stack  at emitTwo (events.js:87:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
gyp ERR! System Linux 3.8.13-bone47 
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/debian/winShare/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/debian/winShare/node_modules/sqlite3/lib/binding/node-v46-linux-arm" 
gyp ERR! cwd /home/debian/winShare/node_modules/sqlite3 
gyp ERR! node -v v4.0.0 
gyp ERR! node-gyp -v v3.0.1 
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 build --fallback-to-build --module=/home/debian/winShare/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/debian/winShare/node_modules/sqlite3/lib/binding/node-v46-linux-arm' (1) 
node-pre-gyp ERR! stack  at ChildProcess.<anonymous> (/home/debian/winShare/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29) 
node-pre-gyp ERR! stack  at emitTwo (events.js:87:13) 
node-pre-gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
node-pre-gyp ERR! stack  at maybeClose (internal/child_process.js:817:16) 
node-pre-gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 
node-pre-gyp ERR! System Linux 3.8.13-bone47 
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/debian/winShare/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" 
node-pre-gyp ERR! cwd /home/debian/winShare/node_modules/sqlite3 
node-pre-gyp ERR! node -v v4.0.0 
node-pre-gyp ERR! node-pre-gyp -v v0.6.10 
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 build --fallback-to-build --module=/home/debian/winShare/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/debian/winShare/node_modules/sqlite3/lib/binding/node-v46-linux-arm' (1) 
npm ERR! Linux 3.8.13-bone47 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "sqlite3" 
npm ERR! node v4.0.0 
npm ERR! npm v2.14.2 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'. 
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-pre-gyp install --fallback-to-build 
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! Please include the following file with any support request: 
npm ERR!  /home/debian/winShare/npm-debug.log 

回答

0

更改爲根sudo su 運行

apt-get update 
apt-get install sqlite3