FreeBSD10でnpm install -gしたらエラーが出たので無理やりどうにかした
gmake、node、npmをpkg install済みの状態で。
npm install -g synth
したら、こんなエラーが出ました。
develop /home/kunst/scfes-scorematch.git >npm install -g synth npm WARN engine npm@1.4.28: wanted: {"node":">=0.8","npm":"1"} (current: {"node":"0.12.0","npm":"2.7.4"}) > node-sass@0.9.3 install /usr/local/lib/node_modules/synth/node_modules/harp/node_modules/terraform/node_modules/node-sass > node build.js child_process: customFds option is deprecated, use stdio instead. gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.0" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/synth/node_modules/harp/node_modules/terraform/node_modules/node-sass/.node-gyp" gmake: ディレクトリ '/usr/local/lib/node_modules/synth/node_modules/harp/node_modules/terraform/node_modules/node-sass/build' に入ります CXX(target) Release/obj.target/binding/binding.o gmake: g++: コマンドが見つかりませんでした binding.target.mk:114: ターゲット 'Release/obj.target/binding/binding.o' のレシピで失敗しました gmake: *** [Release/obj.target/binding/binding.o] エラー 127 gmake: ディレクトリ '/usr/local/lib/node_modules/synth/node_modules/harp/node_modules/terraform/node_modules/node-sass/build' から出ます gyp ERR! build error gyp ERR! stack Error: `gmake` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12) gyp ERR! System FreeBSD 10.1-RELEASE-p9 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/synth/node_modules/harp/node_modules/terraform/node_modules/node-sass gyp ERR! node -v v0.12.0 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok Build failed
この中で
gmake: g++: コマンドが見つかりませんでした
などと供述しており、確認してみたところ
develop /home/kunst/scfes-scorematch.git >which g++ g++: コマンドが見つかりません develop /home/kunst/scfes-scorematch.git >ls /usr/local/bin/g++* g++48
ということだったので、シンボリックリンクを貼ってみました。
develop /home/kunst/scfes-scorematch.git >cd /usr/local/bin/ develop /usr/local/bin >ln -s g++48 g++ develop /usr/local/bin >which g++ /usr/local/bin/g++
再度npm installすると最後まで走りました。