无法安装更好的sqlite3以运行不和谐机器人



我使用树莓派4和Visual Studio代码来设置和运行我的机器人程序。除了better-sqlite3,我的所有软件包都已安装。我尝试重新安装node-gyp(成功安装(,然后再次重新安装better-sqlite3,这是我的错误:

$npm i better-sqlite3
  • better-sqlite3@7.1.1install/home/pi/Code/Waffles/node_modules/better-sqlite3
  • 预生成安装||npm运行生成版本
  • 预构建安装WARN安装未找到预构建的二进制文件(target=114.15.0运行时=node-arch=arm libc=platform=linux(
  • better-sqlite3@7.1.1build-release/home/pi/Code/Waffles/node_modules/better-sqlite3
  • 节点gyp重建--发布
  • make:正在进入目录'/home/pi/Code/Waffles/node_modules/better-sqlite3/build'TOUCH b857c92884e9598d609f6be182a2595df7a8e00.intermediate动作deps_sqlite3_gyp_cate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00.intermediateTOUCH发布/obj.target/deps/locate_sqlite3.stampCC(target(发布/obj.target/sqlite3/gen/sqlite3/sqlite3.o

Windows

若要解决此问题,请打开管理PowerShell窗口,然后运行

npm i -g --add-python-to-path --vs2015 --production windows-build-tools

一旦完成(这可能需要长达30分钟,取决于你的互联网和计算机速度(,重新启动你的电脑,它应该工作

Linux

要在linux上修复此问题,请运行

sudo apt-get install build-essential

然后安装better-sqlite3。

Mac

要在mac上修复此问题,只需

- Install [XCode][1]
- Once XCode is installed, go to Preferences, Downloads, and install the Command Line Tools.

那么应该正确安装更好的sqlite。

希望这能有所帮助

注意:我注意到你是一个新的贡献者,首先,欢迎使用StackOverflow,其次,请务必通过单击帮助你的答案旁边的复选框将你的问题标记为已解决,这样人们就会知道它已解决

这不是一个错误,它是better-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:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-45-generic
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /media/jeremiah/Discord bot/Discord bot/node_modules/better-sqlite3
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

最新更新