[英]npm install sqlite3 takes forever
I am trying to install sqlite3 for use in node.js. 我正在尝试安装sqlite3以在node.js中使用。 However, the installation takes forever and is stuck at the bottom line below. 但是,安装需要永远,并且卡在下面的底线。
I have waited at least 15 minutes for anything to happen. 我等了至少15分钟才能发生任何事情。
I have also tried installing with --build-from-source
appended, with same same result. 我也尝试使用--build-from-source
附加安装,结果相同。
The device I am installing on is a Raspberry Pi, and rebooting it does not solve the issue. 我正在安装的设备是Raspberry Pi,重新启动它并不能解决问题。 Other packages such as socket.io
has been installed successfully previously. 之前已成功安装了其他软件包,例如socket.io
。
npm install sqlite3
npm WARN package.json ServerGPS@1.0.0 No description
npm WARN package.json ServerGPS@1.0.0 No repository field.
npm WARN package.json ServerGPS@1.0.0 No README data
/
> sqlite3@3.0.8 install /home/pi/ServerGPS/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
child_process: customFds option is deprecated, use stdio instead.
child_process: customFds option is deprecated, use stdio instead.
make: Entering directory '/home/pi/ServerGPS/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3080900/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3080900/sqlite3.o
I originally thought that @travisWebb answer correct, but with time even that build failed with a Unable to copy file...
error. 我原本以为@travisWebb的答案是正确的,但是随着时间的推移甚至构建失败, Unable to copy file...
错误。 Going back to try and find a solution I came across a post on GitHub looking for a way to make sure I had the build essentials. 回过头来尝试寻找解决方案我在GitHub上发现了一个帖子,希望找到一种方法来确保我有构建必需品。 I came across this answer instead and it worked, relatively quickly at that. 我找到了这个答案而且它的工作相对较快。
sudo apt-get install libsqlite3-dev
npm install sqlite3 --build-from-source --sqlite=/usr
The device I am installing on is a Raspberry Pi, 我正在安装的设备是Raspberry Pi,
The sqlite3 driver is a native module, and needs to be compiled during installation. sqlite3驱动程序是本机模块,需要在安装期间进行编译。 This compilation will take much longer on a slower processor. 对于较慢的处理器,此编译将花费更长的时间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.