node.js 모듈 빌드 gyp 관련 오류
node.js 사용하다가 gyp 이용하는 모듈 설치시 오류.
$ npm install base64
.
.
.
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/ec2-user/.nvm/v0.10.26/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.4.82-69.112.amzn1.x86_64
gyp ERR! command "node" "/home/ec2-user/.nvm/v0.10.26/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
이런 오류는 필시 python2.6을 사용할 때 나온다. script_main은 python2.7에 딸린 모듈에는 있으므로, 아래와 같은 방법으로 시도해 보자스라.
$ PYTHON=python27 npm install base64
끝.