我正在尝试在我的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上工作,就像魅力一样。
答案 0 :(得分:1)
抱歉我的愚蠢。您必须安装base-devel
个包。 (例如pacman -S base-devel
)。或base-devel group make
,gcc
等