問題
最近在 CentOS 8 上下載 NodeJS 的程式,然後下npm install
,就發生 npm ERR! sqlite3@4.2.0 install: node-pre-gyp install --fallback-to-build
的錯誤。
npm ERR! sqlite3@4.2.0 install:
node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@4.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
解法
因為在 npm install sqlite 時,它會進行編譯,所以還需要安裝 python 及 make
1 | yum install python2 |
之後再下 npm install
就可以了哦!
Windows 解法
1.安裝 Python