guo-yu/douban.fm

MAC 10.9 升级失败!

Closed this issue · 7 comments

环境

MAC OS X 10.9
标准 node 环境

现象:

$ sudo npm install douban.fm -g 之后,

开始有汇报 /Users/zoomq/.node-gyp 目录 Root 没有权限

$ chmod -R 775 /Users/zoomq/.node-gyp 处理后:

...

speaker@0.0.10 install /usr/local/share/npm/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker
node-gyp rebuild

gyp http GET http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz

gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: Connection closed while downloading tarball file
gyp ERR! stack at Request. (/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:223:14)
gyp ERR! stack at Request.EventEmitter.emit (events.js:117:20)
gyp ERR! stack at IncomingMessage. (/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/request/request.js:846:44)
gyp ERR! stack at IncomingMessage.EventEmitter.emit (events.js:117:20)
gyp ERR! stack at IncomingMessage. (http.js:1515:11)
gyp ERR! stack at IncomingMessage.EventEmitter.emit (events.js:117:20)
gyp ERR! stack at _stream_readable.js:920:16
gyp ERR! stack at process._tickCallback (node.js:415:13)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/share/npm/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok

lame@1.0.3 install /usr/local/share/npm/lib/node_modules/douban.fm/node_modules/player/node_modules/lame
node-gyp rebuild

node.js:811
var cwd = process.cwd();
^
Error: ENOENT, no such file or directory
at Function.startup.resolveArgv0 (node.js:811:23)
at startup (node.js:58:13)
at node.js:902:3
npm ERR! speaker@0.0.10 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the speaker@0.0.10 install script.
npm ERR! This is most likely a problem with the speaker package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls speaker
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.24/bin/node" "/usr/local/bin/npm" "install" "douban.fm" "-g"
npm ERR! cwd /Users/zoomq
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/zoomq/npm-debug.log
npm ERR! not ok code 0

分析

点解?

0.1.1 还没发布。。你升级到哪个版本?

是 0.1.0 重新安装,
看 weibo 以为 0.1.1 发布了,
所以,尝试进行,
然后,就没有然后了:

$ douban.fm
bash: /usr/local/share/npm/bin/douban.fm: No such file or directory

Luck !

$ rm -rf /Users/zoomq/.node-gyp 后再来
虽然有报错,但是,成功了!

...

speaker@0.0.10 install /usr/local/share/npm/lib/node_modules/douban.fm/node_modules/player/node_modules/speaker
node-gyp rebuild

gyp http GET http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
CC(target) Release/obj.target/output/deps/mpg123/src/output/coreaudio.o
LIBTOOL-STATIC Release/liboutput.a
CXX(target) Release/obj.target/binding/src/binding.o
SOLINK_MODULE(target) Release/binding.node
SOLINK_MODULE(target) Release/binding.node: Finished

lame@1.0.3 install /usr/local/share/npm/lib/node_modules/douban.fm/node_modules/player/node_modules/lame
node-gyp rebuild

deps/mpg123/test.target.mk:147: warning: overriding commands for target Release/test' deps/lame/test.target.mk:155: warning: ignoring old commands for targetRelease/test'
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/VbrTag.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/bitstream.o
../deps/lame/libmp3lame/bitstream.c:991:32: warning: unused variable 'rsv' [-Wunused-variable]
RpgStateVar_t const const rsv = &gfc->sv_rpg;
^
../deps/lame/libmp3lame/bitstream.c:992:24: warning: unused variable 'rov' [-Wunused-variable]
RpgResult_t *const rov = &gfc->ov_rpg;
^
../deps/lame/libmp3lame/bitstream.c:990:34: warning: unused variable 'cfg' [-Wunused-variable]
SessionConfig_t const *const cfg = &gfc->cfg;
^
3 warnings generated.
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/encoder.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/fft.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/gain_analysis.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/id3tag.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/lame.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/newmdct.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/presets.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/psymodel.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/quantize.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/quantize_pvt.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/reservoir.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/set_get.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/tables.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/takehiro.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/util.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/vbrquantize.o
CC(target) Release/obj.target/mp3lame/deps/lame/libmp3lame/version.o
LIBTOOL-STATIC Release/libmp3lame.a
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/compat.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/parse.o
../deps/mpg123/src/libmpg123/parse.c:184:27: warning: comparison of integers of different signs: 'off_t' (aka 'long long') and
'unsigned long' [-Wsign-compare]
if(fr->track_frames > TRACK_MAX_FRAMES) fr->track_frames = 0; /
endless stream? _/
~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
1 warning generated.
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/frame.o
../deps/mpg123/src/libmpg123/frame.c:285:28: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
if(2_2_0x110_sizeof(real) > buffssize)
~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
1 warning generated.
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/format.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/dct64.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/equalizer.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/id3.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/optimize.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/readers.o
../deps/mpg123/src/libmpg123/readers.c:856:11: warning: comparison of integers of different signs: 'ssize_t' (aka 'long') and
'unsigned long' [-Wsign-compare]
if(got < sizeof(readbuf)) /* That naturally catches got == 0, too. /
~~~ ^ ~~~~~~~~~~~~~~~
1 warning generated.
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/tabinit.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/libmpg123.o
../deps/mpg123/src/libmpg123/libmpg123.c:1581:29: warning: comparison of integers of different signs: 'int' and 'unsigned long'
[-Wsign-compare]
if(errcode >= 0 && errcode < sizeof(mpg123_error)/sizeof(char
))
~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/index.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/stringbuf.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/icy.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/icy2utf8.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/ntom.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/synth.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/synth_8bit.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/layer1.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/layer2.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/layer3.o
../deps/mpg123/src/libmpg123/layer3.c:804:6: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
REFRESH_MASK;
^~~~~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:695:12: note: expanded from macro 'REFRESH_MASK'
while(num < BITSHIFT) {
~~~ ^ ~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:818:6: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
REFRESH_MASK;
^~~~~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:695:12: note: expanded from macro 'REFRESH_MASK'
while(num < BITSHIFT) {
~~~ ^ ~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:842:6: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
REFRESH_MASK;
^~~~~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:695:12: note: expanded from macro 'REFRESH_MASK'
while(num < BITSHIFT) {
~~~ ^ ~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:890:4: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
REFRESH_MASK;
^~~~~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:695:12: note: expanded from macro 'REFRESH_MASK'
while(num < BITSHIFT) {
~~~ ^ ~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:1021:6: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
REFRESH_MASK;
^~~~~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:695:12: note: expanded from macro 'REFRESH_MASK'
while(num < BITSHIFT) {
~~~ ^ ~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:1036:6: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
REFRESH_MASK;
^~~~~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:695:12: note: expanded from macro 'REFRESH_MASK'
while(num < BITSHIFT) {
~~~ ^ ~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:1059:6: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
REFRESH_MASK;
^~~~~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:695:12: note: expanded from macro 'REFRESH_MASK'
while(num < BITSHIFT) {
~~~ ^ ~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:1088:4: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
REFRESH_MASK;
^~~~~~~~~~~~
../deps/mpg123/src/libmpg123/layer3.c:695:12: note: expanded from macro 'REFRESH_MASK'
while(num < BITSHIFT) {
~~~ ^ ~~~~~~~~
8 warnings generated.
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/feature.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/dct64_x86_64.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/dct64_x86_64_float.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/synth_s32.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/synth_real.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/synth_stereo_x86_64.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/synth_stereo_x86_64_float.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/synth_stereo_x86_64_s32.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/synth_x86_64.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/synth_x86_64_s32.o
CC(target) Release/obj.target/mpg123/deps/mpg123/src/libmpg123/synth_x86_64_float.o
LIBTOOL-STATIC Release/libmpg123.a
CC(target) Release/obj.target/lamevectorroutines/deps/lame/libmp3lame/vector/xmm_quantize_sub.o
LIBTOOL-STATIC Release/liblamevectorroutines.a
CXX(target) Release/obj.target/bindings/src/bindings.o
CXX(target) Release/obj.target/bindings/src/node_lame.o
CXX(target) Release/obj.target/bindings/src/node_mpg123.o
SOLINK_MODULE(target) Release/bindings.node
SOLINK_MODULE(target) Release/bindings.node: Finished
/usr/local/share/npm/bin/douban.fm -> /usr/local/share/npm/lib/node_modules/douban.fm/bin/cli
douban.fm@0.1.0 /usr/local/share/npm/lib/node_modules/douban.fm
├── paramrule@0.0.2
├── sprintf@0.1.3
├── colorful@2.1.0
├── underscore@1.5.2
├── mkdirp@0.3.5
├── consoler@0.0.8 (colors@0.6.2)
├── term-list@0.2.1 (keypress@0.2.1, term-canvas@0.0.5)
├── exeq@0.4.0 (win-spawn@2.0.0, arale@0.2.0)
├── optimist@0.6.0 (wordwrap@0.0.2, minimist@0.0.5)
├── beer@0.0.8 (request@2.31.0)
└── player@0.1.0 (async@0.2.9, request@2.31.0, speaker@0.0.10, lame@1.0.3)

这样啊。。
如果要升级仓库里不稳定的版本,可以这样:

sudo npm install https://github.com/turingou/douban.fm.git -g

收到!
应该增补到文档中,
以便收集主动小白鼠们的反馈,,,

2014/1/16 Guo Yu notifications@github.com

这样啊。。
如果要升级仓库里不稳定的版本,可以这样:

sudo npm install https://github.com/turingou/douban.fm.git -g


Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-32455658
.

人生苦短, Pythonic! 冗余不做,日子甭过!备份不做,十恶不赦!
KM keep growing environment culture which promoting organization be
learnning!
俺: http://zoomquiet.io
许: http://creativecommons.org/licenses/by-sa/2.5/cn/

@ZoomQuiet 果断使用七牛的node tgz镜像

$ npm install --disturl=http://dist.u.qiniudn.com --registry=http://r.cnpmjs.org douban.fm

node-gyp 安装的时候没有验证shasum, 如果tgz中途下载失败, 会导致安装失败而且提示不会正确...

哈哈, 或者你干脆安装一个 cnpm, 解决国内访问npm慢的难题, 而且还会有快感.

$ [sudo] npm install cnpm -g
$ [sudo] cnpm install douban.fm -g
gyp ERR! stack Error: Connection closed while downloading tarball file
gyp ERR! stack at Request. (/usr/local/Cellar/node/0.10.24/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:223:14)

@turingou 哈哈, 推荐将 readme 里面的文档安装的时候加上

--disturl=http://dist.u.qiniudn.com --registry=http://r.cnpmjs.org

确保小白在国内安装速度.