개요
npm
을 통한 패키지 설치 중 발생한 오류와 대응 방법을 기록합니다.
본문
오류 1. - gyp ERR! stack Error: self signed certificate in certificate chain
$ npm install
gyp ERR! configure error
gyp ERR! stack Error: self signed certificate in certificate chain
gyp ERR! stack at TLSSocket.onConnectSecure (_tls_wrap.js:1514:34)
gyp ERR! stack at TLSSocket.emit (events.js:375:28)
gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:936:8)
gyp ERR! stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:708:12)
gyp ERR! System Linux 5.8.0-44-generic
gyp ERR! command "/home/sergio/.nvm/versions/node/v14.17.1/bin/node" "/home/sergio/.nvm/versions/node/v14.17.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/sergio/stackedit/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/sergio/stackedit/node_modules/sqlite3/lib/binding/node-v83-linux-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /home/sergio/stackedit/node_modules/sqlite3
gyp ERR! node -v v14.17.1
대응 1.
$ cd ~
$ echo quit | openssl s_client -showcerts -servername www.naver.com -connect www.naver.com:443 > cacert.pem
$ npm config set cafile ~/cacert.pem --global
$ export NODE_EXTRA_CA_CERTS=~/cacert.pem
$ cd ~/workspace/myApp
$ npm install
오류 2. - gyp ERR! stack Error: not found: make
$ npm install
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for sqlite3@4.0.9 and node@14.17.1 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error unable to get local issuer certificate
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/home/sergio/.nvm/versions/node/v14.17.1/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/home/sergio/.nvm/versions/node/v14.17.1/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/home/sergio/.nvm/versions/node/v14.17.1/lib/node_modules/npm/node_modules/which/which.js:80:29)
대응 2.
sudo apt-get install build-essential
오류3. -/bin/sh: 1: python: not found
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for sqlite3@4.0.9 and node@14.17.1 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error unable to get local issuer certificate
make: Entering directory '/home/sergio/stackedit/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c
/bin/sh: 1: python: not found
make: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c] Error 127
make: Leaving directory '/home/sergio/stackedit/node_modules/sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
.. 생략 ..
대응 3.
sudo apt-get install python3 python-is-python3
'모듈, 프레임웍' 카테고리의 다른 글
[Quasar] TimePicker 한글 사용하기 (패키지 패치) (0) | 2021.12.10 |
---|---|
Mono - Hello World (0) | 2018.07.16 |