0

我正在尝试在我的 Raspberry Pi B 上安装 ghost,它真的让我发疯。

我提取了 zip (7.0.1),我安装了 npm (2.14.3-1)、nodejs (0.12.7) 甚至 sqlite3 (3.8.11),它们都是最新版本。我正在使用 Archlinux ARM。

我这样做了npm install --production,我得到:

> sqlite3@3.0.8 install /var/www/dh/workdir/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build     

gyp ERR! build error                           
gyp ERR! stack Error: not found: make          
gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:72:28)
gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:75:29)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:83:16
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:95:15)
gyp ERR! System Linux 4.1.5-1-ARCH             
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm"                                       
gyp ERR! cwd /var/www/dh/workdir/node_modules/sqlite3
gyp ERR! node -v v0.12.7                       
gyp ERR! node-gyp -v v2.0.2                    
gyp ERR! not ok                                
node-pre-gyp ERR! build error                  
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm' (1)               
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/var/www/dh/workdir/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
node-pre-gyp ERR! System Linux 4.1.5-1-ARCH    
node-pre-gyp ERR! command "node" "/var/www/dh/workdir/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /var/www/dh/workdir/node_modules/sqlite3
node-pre-gyp ERR! node -v v0.12.7              
node-pre-gyp ERR! node-pre-gyp -v v0.6.7       
node-pre-gyp ERR! not ok                       
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm' (1)                                              
npm ERR! Linux 4.1.5-1-ARCH                    
npm ERR! argv "node" "/usr/bin/npm" "install" "--production" "--sqlite=/usr/bin"
npm ERR! node v0.12.7                          
npm ERR! npm  v2.14.3                          
npm ERR! code ELIFECYCLE                       

npm ERR! sqlite3@3.0.8 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1                         
npm ERR!                                       
npm ERR! Failed at the sqlite3@3.0.8 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!     /var/www/dh/workdir/npm-debug.log 

我发现解决方案可能是npm install sqlite3 --build-from-source,但 id 并没有改变任何东西:

-                                              
> sqlite3@3.0.8 install /var/www/dh/workdir/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build     

gyp ERR! build error                           
gyp ERR! stack Error: not found: make          
gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:72:28)
gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:75:29)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:83:16
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:95:15)
gyp ERR! System Linux 4.1.5-1-ARCH             
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm"                                       
gyp ERR! cwd /var/www/dh/workdir/node_modules/sqlite3
gyp ERR! node -v v0.12.7                       
gyp ERR! node-gyp -v v2.0.2                    
gyp ERR! not ok                                
node-pre-gyp ERR! build error                  
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm' (1)               
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/var/www/dh/workdir/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
node-pre-gyp ERR! System Linux 4.1.5-1-ARCH    
node-pre-gyp ERR! command "node" "/var/www/dh/workdir/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /var/www/dh/workdir/node_modules/sqlite3
node-pre-gyp ERR! node -v v0.12.7              
node-pre-gyp ERR! node-pre-gyp -v v0.6.7       
node-pre-gyp ERR! not ok                       
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/var/www/dh/workdir/node_modules/sqlite3/lib/binding/node-v14-linux-arm' (1)                                              
npm ERR! Linux 4.1.5-1-ARCH                    
npm ERR! argv "node" "/usr/bin/npm" "install" "sqlite3" "--build-from-source"
npm ERR! node v0.12.7                          
npm ERR! npm  v2.14.3                          
npm ERR! code ELIFECYCLE                       

npm ERR! sqlite3@3.0.8 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1                         
npm ERR!                                       
npm ERR! Failed at the sqlite3@3.0.8 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!     /var/www/dh/workdir/npm-debug.log 

我也试过了sudo(我在做的时候一直在尖叫),但没有区别。我也尝试添加--unsafe-perm但没有帮助。

知道我接下来应该做什么吗?它像魅力一样在我的 x86_64 位 archlinux 上运行。

4

1 回答 1

1

对不起我的愚蠢。您必须安装base-devel软件包。(例如通过pacman -S base-devel)。或来自base-devel 组的适当软件包,如make,gcc等。

于 2015-09-18T09:20:40.860 回答