npm install -g topojsonでxcode-select: Error
(エラー内容)
$ npm install -g topojson
.........
xcode-select: Error: No Xcode is selected. Use xcode-select -switch, or see the xcode-select manpage (man xcode-select) for further information.
gyp: Error 2 running xcodebuild
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:424:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Darwin 12.4.1
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! weird error 1
........
(対策)
どうやらxcode4.3からパスが変更されているのでソフトによって対応してあげないといけないそうです。
$ sudo su
$ xcode-select -switch /Library/Developer/
$ exit
$ npm install -g topojson
参考:
Xcode 4.5 Command Line Tools - xcode-select issue
- 関連記事
-
- qgisをosxへインストール
- npm install -g topojsonでxcode-select: Error
- AirMacカードがインストールされてませんと突然表示された