npm模块安装不断中止 [英] npm module installation constantly aborting

查看:156
本文介绍了npm模块安装不断中止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了npm模块的安装问题。
每次我尝试安装一个新的模块,安装过程崩溃,因此中止。
我的npm版本是1.4.28,节点版本是0.10.35在debian wheezy上运行。我尝试安装几个(哟,凉亭,咕噜,关闭编译器)和同样的问题。请参阅

下的示例安装尝试

  npm install closurecompiler -g 

以上将以下内容泄漏给终端

  ====堆栈跟踪======================================== 

安全上下文:0x25834659< JS对象>#0#
1:_parse(aka parse)[/usr/local/lib/node_modules/npm/node_modules/tar/lib/extended-header.js: 〜61](this = 0x38fada59< a ExtendedHeader>#1#,c = 0x38fb05c5< a Buffer>#2#)
2:emit [events.js:〜53](this = 0x38fada59<扩展阅读器>#1#,type = 0x51614861< String [4]:data>)
3:参数适配器帧:2-> 1
4:_read [/ usr / local / lib / node_modules /npm/node_modules/tar/lib/entry.js:111](this = 0x38fada59< a ExtendedHeader>#1#)
8:_read [native v8natives.js:1594](this = 0x38fada59< an ExtendedHeader>#1#)
9:write [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:~50](this = 0x38 fada59< a ExtendedHeader>#1#,c = 0x38fb05c5< a Buffer>#2#)
10:_process [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js :105](this = 0x38f3afc9< an Extract>#3#,c = 0x38fb05c5< a Buffer>#2#)
11:/ * anonymous * / [/ usr / local / lib / node_modules / /node_modules/tar/lib/parse.js:~46](this = 0x38f430c1< a BlockStream>#4#,c = 0x38fb05c5< a缓冲区#2#)
12:emit [events.js :〜53](this = 0x38f430c1< a BlockStream>#4#,type = 0x51614861< String [4]:data>)
13:参数适配器框架:2-> 1
14 :_emitChunk [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:145](this = 0x38f430c1< a BlockStream#4#,flush = 0x25808091< undefined>)
15:参数适配器框架:0-> 1
16:resume [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:~55](this = 0x38f430c1< a BlockStream>#4#)17:参数适配器框架:1-> 0
18:resume [/ usr / loc al / lib / node_modules / npm / node_modules / fstream / lib / reader.js:〜251](this = 0x38f3afc9< an Extract>#3#,who = 0x25808091< undefined>)
19:框架:0-> 1
20:/ * anonymous * / [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extract.js:57](this = 0x38f43109< a DirWriter> ;#5#)
21:emit [events.js:〜53](this = 0x38f43109< a DirWriter>#5#,type = 0x3334f785< String [5]:ready>)
22:/ * anonymous * / [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:39](this = 0x25834701< JS Global Object>#6#,er = 0x25808081 < null>)
23:参数适配器框架:2-> 1
24:/ * anonymous * / [/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js :29](this = 0x25834701< JS Global Object>#6#,er = 0x25808081< null>)
26:oncomplete [fs.js:108](this = 0x38f94099< an Object>#7 #)
27:参数适配器框架:1-> 0

====详细信息================== ============ ================

[1]:_parse(aka parse)[/ usr / local / lib / node_modules / npm / node_modules / tar / lib /extended-header.js:~61](this = 0x38fada59< a ExtendedHeader>#1#,c = 0x38fb05c5< a Buffer>#2#){
//堆栈分配的本地人
var i = 411
var l = 512
var b = 68
var val = 0x38fb17ad< String [5]:2.4.x>
//表达式堆栈(从上到下)
[05]:0
[04]:2113118
--------- sourcecode ----- ----
函数解析(c){? if(this._state === ERR)返回? for(var i = 0,l = c.length?; i
-------------------------------- ---------
}

[2]:emit [events.js:〜53](this = 0x38fada59< a ExtendedHeader>#1#,type = 0x51614861< String [4]:data>){
//优化框架
}
[3]:参数适配器框架:2-> 1 {
//实际参数
[00]:0x51614861< String [4]:data>
[01]:0x38fb05c5< a缓冲区#2#//未传递到被调用者
}

[4]:_read [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:111](this = 0x38fada59< a ExtendedHeader>#1#){
//堆栈分配的本地人
var chunk = 0x38fb05c5< a缓冲区>#2#
var mql = 0x25808091< undefined>
//表达式堆栈(从上到下)
[04]:0x38fb05c5< a缓冲区>#2#
[03]:0x51614861< String [4]:data>
[02]:0x38fada59< a扩展读取器>#1 #
--------- sourcecode ---------
function(){?// console.error(Tar Ent ry _read,this.path)? if(this._paused || this._reading || this._ended)return? //设置这个标志,使事件处理程序不会无意中? //获取多个_read()调用运行。 this._reading = true? //有任何数据要发出? while(this._index
------------------------------- ----------
}

[8]:_read [native v8natives.js:1594](this = 0x38fada59< a ExtendedHeader>#1#){
//堆栈分配的本地人
var arguments = 0x38fb0651< a参数>#8#
var c = 0x38fb0661< JS数组[2]>#9#
var d = 0
var e = 0x25808091< undefined>
var f = 0x25808091< undefined>
var g = 0x25808091< undefined>
var h = 0x25808091&未定义>
//表达式堆栈(从上到下)
[11]:0
[10]:2
[09]:0x38fb0661< JS Array [2]> ;#9#
[08]:0x38fada59< a ExtendedHeader&#1#
[07]:0x41cb91f5< JS功能#10#
-------- - sourcecode ---------
function(){??use strict; if(%_ IsConstructCall()){?return%NewObjectFromBound(b);?}?var c =%BoundFunctionGetBindings(b);?var d =%_ ArgumentsLength();?if(d == 0){?return%Apply(c [0],c [1],c,2,c.length-2 );?}?if(c.length === 2){?return%Apply(c [0],c [1],arguments,0,d);?}?var e = c.length-2; ?var f = new InternalArray(e + ...

------------------------------- ----------
}

[9]:写[/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js: 〜50](this = 0x38fada59< a ExtendedHeader>#1#,c = 0x38fb05c5< a Buffer>#2#){
//优化框架
}
[10] _process [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:105](this = 0x38f3afc9< an Extract>#3#,c = 0x38fb05c5< a Buffer>#2#) {
//堆栈分配的本地人
var entry = 0x38fada59< a ExtendedHeader>#1#
var zero = 0x25808091< undefined>
var i = 0x25808091< undefined>
//表达式堆栈(从上到下)
[04]:0x38fb05c5< a缓冲区#2#
[03]:0x38fada59< a扩展阅读器&#1#
--------- sourcecode ---------
函数(c){? assert(c&& c.length === 512,block size should be 512)? //三种情况之一? // 1.一个新的标题? // 2.文件/扩展标题的一部分? // 3.两个或多个EOF空块之一if(this._entry){? var entry = this._entry? entry.write(c)? if(entry._remaining === 0){?...

--------------------------- --------------
}

[11]:/ * anonymous * / [/ usr / local / lib / node_modules / npm / node_modules / tar / lib / parse.js:〜46](this = 0x38f430c1< a BlockStream>#4#,c = 0x38fb05c5< a缓冲区#2#){
//优化帧
}
[12]:emit [events.js:〜53](this = 0x38f430c1< a BlockStream>#4#,type = 0x51614861< String [4]:data>){
//优化的框架
}
[13]:参数适配器框架:2-> 1 {
//实际参数
[00]:0x51614861< String [4]:data> ;
[01]:0x38fb05c5< a缓冲区>#2#//未传递到被调用者
}

[14]:_emitChunk [/ usr / local / lib / node_modules /npm/node_modules/block-stream/block-stream.js:145](this = 0x38f430c1< a BlockStream>#4#,flush = 0x25808091< undefined>){
//堆栈分配的本地
var padBytes = 0x25808091<未定义>
var bufferIndex = 0
var out = 0x38fb05c5< a Buffer>#2#
var outOffset = 0
var outHas = 0
var cur = 0x38f556bd<一个缓冲区>#11#
var curHas = 15360
var l = 0x25808091< undefined>
var i = 0x25808091< undefined>
//表达式堆栈(从上到下)
[11]:0x38fb05c5< a缓冲区#2#
[10]:0x51614861< String [4]:data>
[09]:0x38f430c1< a BlockStream>#4#
--------- s o u c c e e o o e e - - -$
函数(flush){? // debug(emitChunk flush =%j emit =%j paused =%j,flush,this._emitting,this._paused)? //发出< chunkSize>块? if(flush&& this._zeroes){? // debug(BS push zeroes,this._bufferLength)? //推一大块零? var padBytes =(this._bufferLength%this._chun ...

---------------------------- -------------
}

[15]:参数适配器框架:0-> 1 {
}

[16]:resume [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:~55](this = 0x38f430c1< a BlockStream>#4#){
//优化框架
}
[17]:参数适配器框架:1-> 0 {
//实际参数
[00]:0x38f3afc9< an提取>#3#//不传递到被调用者
}

[18]:resume [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/reader.js :〜251](this = 0x38f3afc9< a Extract>#3#,who = 0x25808091< undefined>){
//优化框架
}
[19] :0-> 1 {
}

[20]:/ * anonymous * / [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extract.js :57](this = 0x38f43109< a DirWriter>#5#){
//表达式堆栈(从上到下)
[00]:0x38f3afc9< an Extract>#3#
- -------- s o u c c e e o e e o e e e e e e e e e my.pipe(me._fst,{end:false})? me.resume()? }
-----------------------------------------
}

[21]:emit [events.js:〜53](this = 0x38f43109< a DirWriter>#5#,type = 0x3334f785< String [5]:ready>){
//优化框架
}
[22]:/ * anonymous * / [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:39 ] {
//表达式堆栈(从上到下)
[01]:0x3334f785< String [ 5]:就绪>
[00]:0x38f43109< a DirWriter>#5#
--------- s o u r c e c o e e ---------
function(er){? if(er)return me.error(er)? //准备开始获取条目? me.ready = true? me.emit(准备好)? me._process()? }
-----------------------------------------
}

[23]:参数适配器框架:2-> 1 {
//实际参数
[00]:0x25808081< null>
[01]:0x38f93f31< String [86]:/ usr / local / lib / node_modules / closurecompiler / node_modules / jsdoc / node_modules / underscore> //不传递到被调用者
}

[24]:/ * anonymous * / [/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:29] (this = 0x25834701< JS Global Object>#6#,er = 0x25808081< null>){
//堆分配的本地人
var er = 0x25808081< null>
//表达式堆栈(从上到下)
[03]:0x38f93f31< String [86]:/ usr / local / lib / node_modules / closurecompiler / node_modules / jsdoc / node_modules / underscore>
[02]:0x25808081< null>
[01]:0x25834701< JS全局对象&#6#
[00]:0x38f93a91< JS函数&####
---------源代码 - --------
函数(呃){?如果(!呃){? made = made ||对return cb(null,made);? }?开关(呃代码){?案例ENOENT:? mkdirP(path.dirname(p),opts,function(er,made){?if(er)cb(呃,made);?else mkdirP(p,...

--- --------------------------------------
}

[26]:oncomplete [fs.js:108](this = 0x38f94099< an Object>#7#){
//堆栈分配的本地人
var arguments = 0x38fabf71< an参数> #13#
//表达式堆栈(从上到下)
[03]:0x38fabf71< an参数#13#
[02]:0x25808081< null>
[01]:0x38f93f45< JS函数>#14#
--------- sourcecode ---------
function(){?return cb.apply null,arguments);?}
--------------------------------------- -
}

[27]:参数适配器框架:1-> 0 {
//实际参数
[00]:0x25808081< null> //不传递到被调用者
}

====键======================== ==================

#0#0x25834659:0x25834659< JS对象>
#1#0x38f ada59:0x38fada59< a ExtendedHeader>
域:0x25808081< null>
_events:0x38fadb01< an Object>#15#
_maxListeners:10
可读:0x258080b1< true>
可写:0x258080b1< true>
_needDrain:0x258080c1< false>
_paused:0x258080c1< false>
_reading:0x258080b1< true>
_ending:0x258080c1< false>
_ended:0x258080c1< false>
_remaining:653
_queue:0x38fadb9d< JS数组[1]>#16#
_index:1
_queueLen:1
_read:0x38fadc09< JS功能>#17#
道具:0x38fadca9< an Object>#18#
_header:0x38fac43d< a TarHeader#19#
_extended:0x38fadcd5< an Object>#20#
_global:0x38fadd05< a Object>#21#
type:0x3334ee95< String [14]:ExtendedHeader>
路径:0x38fac5c9< String [30]:PaxHeader / package / package.json>
size:1677
fields:0x38fae435< an Object>#22#
_position:923
_fieldPos:6
_state:1
_sizeBuf:0x38fae4b5 < JS Array [0]>#23#
_keyBuf:0x38fae50d< JS Array [3]>#24#
_valBuf:0x38fae52d< JS Array [0]>#25#
_size:95
_key:0x38fb16f5< String [41]:NODETAR.package.devDependencies.uglify-js>
meta:0x258080b1< true>
#2#0x38fb05c5:0x38fb05c5< a缓冲区>
长度:512
父代:0x38f60e09< a SlowBuffer>#26#
偏移量:1024
#3#0x38f3afc9:0x38f3afc9< an Extract>
域:0x25808081< null>
_events:0x38f430b5< an Object>#27#
_maxListeners:10
可写:0x258080b1< true>
可读:0x258080b1< true>
_stream:0x38f430c1< a BlockStream>#4#
position:1024
_ended:0x258080c1< false>
_fst:0x38f43109< a DirWriter>#5#
_paused:0x258080c1< false>
_eofStarted:0x258080c1< false>
_entry:0x38fada59< a ExtendedHeader>#1#
#4#0x38f430c1:0x38f430c1< a BlockStream>
可读:0x258080b1< true>
可写:0x258080b1< true>
_opt:0x38f4d331< an Object>#28#
_chunkSize:512
_offset:1536
_buffer:0x38f4d33d< JS Array [1]>#29#
_bufferLength:14848
_zeroes:0x38f4d34d< a缓冲区#30#
_events:0x38f4d365< an对象#31#
_paused:0x258080c1< false>
_needDrain:0x258080b1< true>
_emitting:0x258080b1< true>
#5#0x38f43109:0x38f43109< a DirWriter>
域:0x25808081< null>
_events:0x38f4d3a9< an Object>#32#
_maxListeners:10
type:0x3334e6ed< String [9]:Directory>
道具:0x38f297e1< an Object>#33#
depth:0
clobber:0x258080b1< true>
父项:0x25808081< null>
root:0x38f43109< a DirWriter>#5#
路径:0x38f4d3b5< String [86]:/ usr / local / lib / node_modules / closurecompiler / node_modules / jsdoc / node_modules / underscore>
_path:0x38f4d3b5< String [86]:/ usr / local / lib / node_modules / closurecompiler / node_modules / jsdoc / node_modules / underscore>
basename:0x38f51b0d< String [10]:下划线>
dirname:0x38f51b2d< String [75]:/ usr / local / lib / node_modules / closurecompiler / node_modules / jsdoc / node_modules>
linkpath:0x25808081< null>
size:0x25808091< undefined>
可读:0x258080c1< false>
可写:0x258080b1< true>
_buffer:0x38f51b41< JS Array [0]>#34#
ready:0x258080b1< true>
过滤器:0x253df285< JS函数>#35#
_madeDir:0x25808081< null>
#6#0x25834701:0x25834701< JS全局对象>
#7#0x38f94099:0x38f94099< an Object>
域:0x25808081< null>
oncomplete:0x38f93f85< JS函数>#36#
#8#0x38fb0651:0x38fb0651< an参数>
length:0
#9#0x38fb0661:0x38fb0661< JS Array [2]>
0:0x41cb91f5< JS功能>#10#
1:0x38fada59< a扩展读取器>#1#
#10#0x41cb91f5:0x41cb91f5< JS功能>
#11#0x38f556bd:0x38f556bd< a缓冲区>
长度:16384
父代:0x38f60e09< a SlowBuffer>#26#
偏移量:0
#12#0x38f93a91:0x38f93a91< JS功能>
#13#0x38fabf71:0x38fabf71< an Arguments>
length:1
callee:0x38f93f85< JS函数>#36#
#14#0x38f93f45:0x38f93f45< JS函数>
#15#0x38fadb01:0x38fadb01< a对象>
数据:0x2d575f75< JS函数解析>#37#
结束:0x38fada35< JS函数>#38#
pause:0x38fae5c1< JS函数>#39#
#16#0x38fadb9d:0x38fadb9d< JS Array [1]>
0:0x38fb05c5< a缓冲区>#2#
#17#0x38fadc09:0x38fadc09< JS功能>
长度:0
#18#0x38fadca9:0x38fadca9< a对象>
#19#0x38fac43d:0x38fac43d< a TarHeader>
block:0x38fac3d9< a Buffer>#40#
cksumValid:0x258080b1< true>
路径:0x38fac5c9< String [30]:PaxHeader / package / package.json>
mode:420
uid:0x38fad001< Number:1916975748>
gid:0x38fad139< Number:1700319516>
size:1677
mtime:0x38fad265< Number:1392064404>
cksum:7170
类型:0x51615be5< String [1]:x>
linkpath:0x5160812d< String [0]:>
ustar:0x38fad48d< String [6] \:ustar\x00>
ustarver:0x38fad4d5< String [2]:00>
uname:0x5160812d< String [0]:>
gname:0x5160812d< String [0]:>
devmaj:0
devmin:0
fill:0x5160812d< String [0]:>
#20#0x38fadcd5:0x38fadcd5< an Object>
#21#0x38fadd05:0x38fadd05< an Object>
#22#0x38fae435:0x38fae435< an Object>
#23#0x38fae4b5:0x38fae4b5< JS Array [0]>
#24#0x38fae50d:0x38fae50d< JS Array [3]>
0:78
1:79
2:68
#25#0x38fae52d:0x38fae52d< JS Array [0]>
#26#0x38f60e09:0x38f60e09< a SlowBuffer>
长度:16384
#27#0x38f430b5:0x38f430b5< an对象>
条目:0x38f519f9< JS Array [3]>#41#
unpipe:0x38f51a09< JS函数onunpipe>#42#
drain:0x38f51a2d< JS函数>#43#
错误:0x38f51a51< JS Array [3]>#44#
close:0x38f51a61< JS Array [3]>#45#
完成:0x38f51a71< JS功能g> ;#46#
data:0x38fac10d< JS函数ondata>#47#
end:0x38fac1c1< JS函数清理&#48#
#28#0x38f4d331:0x38f4d331< a对象& ;
#29#0x38f4d33d:0x38f4d33d< JS Array [1]>
0:0x38f556bd< a缓冲区>#11#
#30#0x38f4d34d:0x38f4d34d< a缓冲区>
长度:512
父代:0x38f08845< a SlowBuffer>#49#
偏移量:2560
#31#0x38f4d365:0x38f4d365< an对象>
错误:0x38f556d5< JS功能>#50#
数据:0x38f556f9< JS功能>#51#
结束:0x38f5571d< JS功能#52#
:0x38f55741< JS函数>#53#
#32#0x38f4d3a9:0x38f4d3a9< a对象>
ready:0x38f55779< JS函数>#54#
错误:0x38fac289< JS数组[2]>#55#
drain:0x38fac211< JS Array [2]> #56#
close:0x38fac381< JS Array [2]>#57#
#33#0x38f297e1:0x38f297e1< an Object>
类型:0x3334e6ed< String [9]:目录>
path:0x38f2898d< String [86]:/ usr / local / lib / node_modules / closurecompiler / node_modules / jsdoc / node_modules / underscore>
strip:1
uid:5000
gid:5000
过滤器:0x253df285< JS功能#35#
目录:0x258080b1< true>
root:0x25808081< null>
父项:0x25808081< null>
#34#0x38f51b41:0x38f51b41< JS Array [0]>
#35#0x253df285:0x253df285< JS功能>
#36#0x38f93f85:0x38f93f85< JS功能>
#37#0x2d575f75:0x2d575f75< JS功能分析>
#38#0x38fada35:0x38fada35< JS功能>
#39#0x38fae5c1:0x38fae5c1< JS功能>
#40#0x38fac3d9:0x38fac3d9< a缓冲区>
长度:512
父代:0x38f60e09< a SlowBuffer>#26#
偏移量:0
#41#0x38f519f9:0x38f519f9< JS数组[3]
0:0x38f60cb9< JS函数>#58#
1:0x38f297bd< JS函数extractEntry>#59#
2:0x38fac055< JS函数>#60#
#42#0x38f51a09:0x38f51a09< JS功能onunpipe>
#43#0x38f51a2d:0x38f51a2d< JS功能>
#44#0x38f51a51:0x38f51a51< JS Array [3]>
0:0x38f60d25< JS函数onerror>#61#
1:0x38f60db5< JS函数>#62#
2:0x38fac19d< JS函数onerror>#63#
#45#0x38f51a61:0x38f51a61< JS Array [3]>
0:0x38f60dd9< JS函数g>#64#
1:0x38f29749< JS函数cb#65#
2:0x38fac1c1< JS函数清理&#48#
#46#0x38f51a71:0x38f51a71< JS Function g>
listener:0x38f60d6d< JS功能onfinish>#66#
#47#0x38fac10d:0x38fac10d< JS功能ondata>
#48#0x38fac1c1:0x38fac1c1< JS功能清理>
#49#0x38f08845:0x38f08845< a SlowBuffer>
长度:8192
已使用:5248
#50#0x38f556d5:0x38f556d5< JS功能>
#51#0x38f556f9:0x38f556f9< JS功能>
#52#0x38f5571d:0x38f5571d< JS功能>
#53#0x38f55741:0x38f55741< JS功能>
#54#0x38f55779:0x38f55779< JS功能>
#55#0x38fac289:0x38fac289< JS Array [2]>
0:0x38f5579d< JS函数>#67#
1:0x38fac19d< JS函数onerror>#63#
#56#0x38fac211:0x38fac211< JS Array [2]
0:0x38f557c1< JS函数>#68#
1:0x38fac131< JS函数ondrain>#69#
#57#0x38fac381:0x38fac381< JS Array [2]
0:0x38f557e5< JS函数>#70#
1:0x38fac1c1< JS功能清理&#48#
#58#0x38f60cb9:0x38f60cb9< JS功能>
#59#0x38f297bd:0x38f297bd< JS函数extractEntry>
#60#0x38fac055:0x38fac055< JS功能>
#61#0x38f60d25:0x38f60d25< JS Function onerror>
#62#0x38f60db5:0x38f60db5< JS功能>
#63#0x38fac19d:0x38fac19d< JS Function onerror>
#64#0x38f60dd9:0x38f60dd9< JS Function g>
listener:0x38f60d49< JS函数onclose>#71#
#65#0x38f29749:0x38f29749< JS函数cb>
#66#0x38f60d6d:0x38f60d6d< JS功能onfinish>
#67#0x38f5579d:0x38f5579d< JS功能>
#68#0x38f557c1:0x38f557c1< JS功能>
#69#0x38fac131:0x38fac131< JS功能ondrain>
#70#0x38f557e5:0x38f557e5< JS功能>
#71#0x38f60d49:0x38f60d49< JS函数onclose>
===================

中止
[7.14 #########]即使清除缓存(npm缓存清除并更改了npm所使用的所有文件夹的所有权),也可以在$ n


$ b <问题仍然存在。



我的初步猜测可能是节点没有正确解析收到的json数据,但是我所做的一切努力似乎没有做到这一点。 / p>

解决方案

再次感谢



我尝试了这个建议,所以我最终导致从源代码建立起来,我的初始版本基于v0.10.35,所以我决定检查 repo 对于具有预先构建的arm的nodejs的版本。现在,最新版本的nodejs是v0.11.14,但是具有预先构建的二进制文件的版本是v0 .11.12



然后,我决定和v0.11.12一起去,希望如果成功编译手臂可能会为我工作。我下载了来源并将其解压缩。



每次使用节点时,让生活更容易一些,最终避免 sudoing npm ,我创建了一个这样的shebang( build.sh ),并保存在根目录提取文件。由于我的架构是 arm (第7版),所以我用标志来指导我的g ++和gcc。

 #!/ bin / bash 
export CFLAGS =' - march = armv7-a'
export CXXFLAGS =' - march = armv7-a'
./configure --prefix = $ HOME / local / nodejs
make install

然后我使 build.sh 可执行文件

  sudo chmod a + x build .sh 

安装成功(需要几个小时才能构建),通过执​​行build.sh文件

  ./ build.sh 

然后我将NODE_PATH导出到我的〜/ .bashrc个人资料,如此..

  nano〜 /.bashrc 
export NODE = $ HOME / local / nodejs
export NODE_PATH = $ NODE / lib / node_modules
export PATH = $ NODE / bin:$ PATH

快速启用配置

 来源〜/ .bashrc 

然后测试安装

  node -v 

v0.11.12

  npm -v 

1.4.3



最后更新npm

  npm -g install npm @ latest 
npm -v

2.1.18


I am faced with npm module installation issue. Each time I tried installing a new modules, the installation process crashes and consequently abort. My npm version is 1.4.28 and node version is 0.10.35 running on debian wheezy. I tried installing a couple (yo, bower, grunt, closurecompiler) and the same problem persit. See sample installation attempt below

npm install closurecompiler -g

The above spill the following to the terminal

==== Stack trace ============================================

Security context: 0x25834659 <JS Object>#0#
    1: _parse(aka parse) [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extended-header.js:~61] (this=0x38fada59 <an ExtendedHeader>#1#,c=0x38fb05c5 <a Buffer>#2#)
    2: emit [events.js:~53] (this=0x38fada59 <an ExtendedHeader>#1#,type=0x51614861 <String[4]: data>)
    3: arguments adaptor frame: 2->1
    4: _read [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:111] (this=0x38fada59 <an ExtendedHeader>#1#)
    8: _read [native v8natives.js:1594] (this=0x38fada59 <an ExtendedHeader>#1#)
    9: write [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:~50] (this=0x38fada59 <an ExtendedHeader>#1#,c=0x38fb05c5 <a Buffer>#2#)
   10: _process [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:105] (this=0x38f3afc9 <an Extract>#3#,c=0x38fb05c5 <a Buffer>#2#)
   11: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:~46] (this=0x38f430c1 <a BlockStream>#4#,c=0x38fb05c5 <a Buffer>#2#)
   12: emit [events.js:~53] (this=0x38f430c1 <a BlockStream>#4#,type=0x51614861 <String[4]: data>)
   13: arguments adaptor frame: 2->1
   14: _emitChunk [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:145] (this=0x38f430c1 <a BlockStream>#4#,flush=0x25808091 <undefined>)
   15: arguments adaptor frame: 0->1
   16: resume [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:~55] (this=0x38f430c1 <a BlockStream>#4#)   17: arguments adaptor frame: 1->0
   18: resume [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/reader.js:~251] (this=0x38f3afc9 <an Extract>#3#,who=0x25808091 <undefined>)
   19: arguments adaptor frame: 0->1
   20: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extract.js:57] (this=0x38f43109 <a DirWriter>#5#)
   21: emit [events.js:~53] (this=0x38f43109 <a DirWriter>#5#,type=0x3334f785 <String[5]: ready>)
   22: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:39] (this=0x25834701 <JS Global Object>#6#,er=0x25808081 <null>)
   23: arguments adaptor frame: 2->1
   24: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:29] (this=0x25834701 <JS Global Object>#6#,er=0x25808081 <null>)
   26: oncomplete [fs.js:108] (this=0x38f94099 <an Object>#7#)
   27: arguments adaptor frame: 1->0

==== Details ================================================

[1]: _parse(aka parse) [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extended-header.js:~61] (this=0x38fada59 <an ExtendedHeader>#1#,c=0x38fb05c5 <a Buffer>#2#) {
  // stack-allocated locals
  var i = 411
  var l = 512
  var b = 68
  var val = 0x38fb17ad <String[5]: 2.4.x>
  // expression stack (top to bottom)
  [05] : 0
  [04] : 2113118
--------- s o u r c e   c o d e ---------
function parse(c) {?  if (this._state === ERR) return??  for ( var i = 0, l = c.length?      ; i < l?      ; this._position++, this._fieldPos++, i++) {?    // console.error("top of loop, size="+this._size)??    var b = c[i]??    if (this._size >= 0 && this._fieldPos > this._size) {?      error(this, "field exceed...

-----------------------------------------
}

[2]: emit [events.js:~53] (this=0x38fada59 <an ExtendedHeader>#1#,type=0x51614861 <String[4]: data>) {
// optimized frame
}
[3]: arguments adaptor frame: 2->1 {
  // actual arguments
  [00] : 0x51614861 <String[4]: data>
  [01] : 0x38fb05c5 <a Buffer>#2#  // not passed to callee
}

[4]: _read [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:111] (this=0x38fada59 <an ExtendedHeader>#1#) {
  // stack-allocated locals
  var chunk = 0x38fb05c5 <a Buffer>#2#
  var mql = 0x25808091 <undefined>
  // expression stack (top to bottom)
  [04] : 0x38fb05c5 <a Buffer>#2#
  [03] : 0x51614861 <String[4]: data>
  [02] : 0x38fada59 <an ExtendedHeader>#1#
--------- s o u r c e   c o d e ---------
function () {?  // console.error("    Tar Entry _read", this.path)??  if (this._paused || this._reading || this._ended) return??  // set this flag so that event handlers don't inadvertently?  // get multiple _read() calls running.?  this._reading = true??  // have any data to emit??  while (this._index < thi...

-----------------------------------------
}

[8]: _read [native v8natives.js:1594] (this=0x38fada59 <an ExtendedHeader>#1#) {
  // stack-allocated locals
  var arguments = 0x38fb0651 <an Arguments>#8#
  var c = 0x38fb0661 <JS Array[2]>#9#
  var d = 0
  var e = 0x25808091 <undefined>
  var f = 0x25808091 <undefined>
  var g = 0x25808091 <undefined>
  var h = 0x25808091 <undefined>
  // expression stack (top to bottom)
  [11] : 0
  [10] : 2
  [09] : 0x38fb0661 <JS Array[2]>#9#
  [08] : 0x38fada59 <an ExtendedHeader>#1#
  [07] : 0x41cb91f5 <JS Function>#10#
--------- s o u r c e   c o d e ---------
function (){??"use strict";???if(%_IsConstructCall()){?return %NewObjectFromBound(b);?}?var c=%BoundFunctionGetBindings(b);??var d=%_ArgumentsLength();?if(d==0){?return %Apply(c[0],c[1],c,2,c.length-2);?}?if(c.length===2){?return %Apply(c[0],c[1],arguments,0,d);?}?var e=c.length-2;?var f=new InternalArray(e+...

-----------------------------------------
}

[9]: write [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:~50] (this=0x38fada59 <an ExtendedHeader>#1#,c=0x38fb05c5 <a Buffer>#2#) {
// optimized frame
}
[10]: _process [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:105] (this=0x38f3afc9 <an Extract>#3#,c=0x38fb05c5 <a Buffer>#2#) {
  // stack-allocated locals
  var entry = 0x38fada59 <an ExtendedHeader>#1#
  var zero = 0x25808091 <undefined>
  var i = 0x25808091 <undefined>
  // expression stack (top to bottom)
  [04] : 0x38fb05c5 <a Buffer>#2#
  [03] : 0x38fada59 <an ExtendedHeader>#1#
--------- s o u r c e   c o d e ---------
function (c) {?  assert(c && c.length === 512, "block size should be 512")??  // one of three cases.?  // 1. A new header?  // 2. A part of a file/extended header?  // 3. One of two or more EOF null blocks??  if (this._entry) {?    var entry = this._entry?    entry.write(c)?    if (entry._remaining === 0) {?...

-----------------------------------------
}

[11]: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:~46] (this=0x38f430c1 <a BlockStream>#4#,c=0x38fb05c5 <a Buffer>#2#) {
// optimized frame
}
[12]: emit [events.js:~53] (this=0x38f430c1 <a BlockStream>#4#,type=0x51614861 <String[4]: data>) {
// optimized frame
}
[13]: arguments adaptor frame: 2->1 {
  // actual arguments
  [00] : 0x51614861 <String[4]: data>
  [01] : 0x38fb05c5 <a Buffer>#2#  // not passed to callee
}

[14]: _emitChunk [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:145] (this=0x38f430c1 <a BlockStream>#4#,flush=0x25808091 <undefined>) {
  // stack-allocated locals
  var padBytes = 0x25808091 <undefined>
  var bufferIndex = 0
  var out = 0x38fb05c5 <a Buffer>#2#
  var outOffset = 0
  var outHas = 0
  var cur = 0x38f556bd <a Buffer>#11#
  var curHas = 15360
  var l = 0x25808091 <undefined>
  var i = 0x25808091 <undefined>
  // expression stack (top to bottom)
  [11] : 0x38fb05c5 <a Buffer>#2#
  [10] : 0x51614861 <String[4]: data>
  [09] : 0x38f430c1 <a BlockStream>#4#
--------- s o u r c e   c o d e ---------
function (flush) {?  // debug("emitChunk flush=%j emitting=%j paused=%j", flush, this._emitting, this._paused)??  // emit a <chunkSize> chunk?  if (flush && this._zeroes) {?    // debug("    BS push zeroes", this._bufferLength)?    // push a chunk of zeroes?    var padBytes = (this._bufferLength % this._chun...

-----------------------------------------
}

[15]: arguments adaptor frame: 0->1 {
}

[16]: resume [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:~55] (this=0x38f430c1 <a BlockStream>#4#) {
// optimized frame
}
[17]: arguments adaptor frame: 1->0 {
  // actual arguments
  [00] : 0x38f3afc9 <an Extract>#3#  // not passed to callee
}

[18]: resume [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/reader.js:~251] (this=0x38f3afc9 <an Extract>#3#,who=0x25808091 <undefined>) {
// optimized frame
}
[19]: arguments adaptor frame: 0->1 {
}

[20]: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extract.js:57] (this=0x38f43109 <a DirWriter>#5#) {
  // expression stack (top to bottom)
  [00] : 0x38f3afc9 <an Extract>#3#
--------- s o u r c e   c o d e ---------
function () {?    me.pipe(me._fst, { end: false })?    me.resume()?  }
-----------------------------------------
}

[21]: emit [events.js:~53] (this=0x38f43109 <a DirWriter>#5#,type=0x3334f785 <String[5]: ready>) {
// optimized frame
}
[22]: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:39] (this=0x25834701 <JS Global Object>#6#,er=0x25808081 <null>) {
  // expression stack (top to bottom)
  [01] : 0x3334f785 <String[5]: ready>
  [00] : 0x38f43109 <a DirWriter>#5#
--------- s o u r c e   c o d e ---------
function (er) {?    if (er) return me.error(er)?    // ready to start getting entries!?    me.ready = true?    me.emit("ready")?    me._process()?  }
-----------------------------------------
}

[23]: arguments adaptor frame: 2->1 {
  // actual arguments
  [00] : 0x25808081 <null>
  [01] : 0x38f93f31 <String[86]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules/underscore>  // not passed to callee
}

[24]: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:29] (this=0x25834701 <JS Global Object>#6#,er=0x25808081 <null>) {
  // heap-allocated locals
  var er = 0x25808081 <null>
  // expression stack (top to bottom)
  [03] : 0x38f93f31 <String[86]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules/underscore>
  [02] : 0x25808081 <null>
  [01] : 0x25834701 <JS Global Object>#6#
  [00] : 0x38f93a91 <JS Function>#12#
--------- s o u r c e   c o d e ---------
function (er) {?        if (!er) {?            made = made || p;?            return cb(null, made);?        }?        switch (er.code) {?            case 'ENOENT':?                mkdirP(path.dirname(p), opts, function (er, made) {?                    if (er) cb(er, made);?                    else mkdirP(p, ...

-----------------------------------------
}

[26]: oncomplete [fs.js:108] (this=0x38f94099 <an Object>#7#) {
  // stack-allocated locals
  var arguments = 0x38fabf71 <an Arguments>#13#
  // expression stack (top to bottom)
  [03] : 0x38fabf71 <an Arguments>#13#
  [02] : 0x25808081 <null>
  [01] : 0x38f93f45 <JS Function>#14#
--------- s o u r c e   c o d e ---------
function () {?    return cb.apply(null, arguments);?  }
-----------------------------------------
}

[27]: arguments adaptor frame: 1->0 {
  // actual arguments
  [00] : 0x25808081 <null>  // not passed to callee
}

==== Key         ============================================

#0# 0x25834659: 0x25834659 <JS Object>
#1# 0x38fada59: 0x38fada59 <an ExtendedHeader>
            domain: 0x25808081 <null>
           _events: 0x38fadb01 <an Object>#15#
     _maxListeners: 10
          readable: 0x258080b1 <true>
          writable: 0x258080b1 <true>
        _needDrain: 0x258080c1 <false>
           _paused: 0x258080c1 <false>
          _reading: 0x258080b1 <true>
           _ending: 0x258080c1 <false>
            _ended: 0x258080c1 <false>
        _remaining: 653
            _queue: 0x38fadb9d <JS Array[1]>#16#
            _index: 1
         _queueLen: 1
             _read: 0x38fadc09 <JS Function>#17#
             props: 0x38fadca9 <an Object>#18#
           _header: 0x38fac43d <a TarHeader>#19#
         _extended: 0x38fadcd5 <an Object>#20#
           _global: 0x38fadd05 <an Object>#21#
              type: 0x3334ee95 <String[14]: ExtendedHeader>
              path: 0x38fac5c9 <String[30]: PaxHeader/package/package.json>
              size: 1677
            fields: 0x38fae435 <an Object>#22#
         _position: 923
         _fieldPos: 6
            _state: 1
          _sizeBuf: 0x38fae4b5 <JS Array[0]>#23#
           _keyBuf: 0x38fae50d <JS Array[3]>#24#
           _valBuf: 0x38fae52d <JS Array[0]>#25#
             _size: 95
              _key: 0x38fb16f5 <String[41]: NODETAR.package.devDependencies.uglify-js>
              meta: 0x258080b1 <true>
#2# 0x38fb05c5: 0x38fb05c5 <a Buffer>
            length: 512
            parent: 0x38f60e09 <a SlowBuffer>#26#
            offset: 1024
#3# 0x38f3afc9: 0x38f3afc9 <an Extract>
            domain: 0x25808081 <null>
           _events: 0x38f430b5 <an Object>#27#
     _maxListeners: 10
          writable: 0x258080b1 <true>
          readable: 0x258080b1 <true>
           _stream: 0x38f430c1 <a BlockStream>#4#
          position: 1024
            _ended: 0x258080c1 <false>
              _fst: 0x38f43109 <a DirWriter>#5#
           _paused: 0x258080c1 <false>
       _eofStarted: 0x258080c1 <false>
            _entry: 0x38fada59 <an ExtendedHeader>#1#
#4# 0x38f430c1: 0x38f430c1 <a BlockStream>
          readable: 0x258080b1 <true>
          writable: 0x258080b1 <true>
              _opt: 0x38f4d331 <an Object>#28#
        _chunkSize: 512
           _offset: 1536
           _buffer: 0x38f4d33d <JS Array[1]>#29#
     _bufferLength: 14848
           _zeroes: 0x38f4d34d <a Buffer>#30#
           _events: 0x38f4d365 <an Object>#31#
           _paused: 0x258080c1 <false>
        _needDrain: 0x258080b1 <true>
         _emitting: 0x258080b1 <true>
#5# 0x38f43109: 0x38f43109 <a DirWriter>
            domain: 0x25808081 <null>
           _events: 0x38f4d3a9 <an Object>#32#
     _maxListeners: 10
              type: 0x3334e6ed <String[9]: Directory>
             props: 0x38f297e1 <an Object>#33#
             depth: 0
           clobber: 0x258080b1 <true>
            parent: 0x25808081 <null>
              root: 0x38f43109 <a DirWriter>#5#
              path: 0x38f4d3b5 <String[86]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules/underscore>
             _path: 0x38f4d3b5 <String[86]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules/underscore>
          basename: 0x38f51b0d <String[10]: underscore>
           dirname: 0x38f51b2d <String[75]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules>
          linkpath: 0x25808081 <null>
              size: 0x25808091 <undefined>
          readable: 0x258080c1 <false>
          writable: 0x258080b1 <true>
           _buffer: 0x38f51b41 <JS Array[0]>#34#
             ready: 0x258080b1 <true>
            filter: 0x253df285 <JS Function>#35#
          _madeDir: 0x25808081 <null>
#6# 0x25834701: 0x25834701 <JS Global Object>
#7# 0x38f94099: 0x38f94099 <an Object>
            domain: 0x25808081 <null>
        oncomplete: 0x38f93f85 <JS Function>#36#
#8# 0x38fb0651: 0x38fb0651 <an Arguments>
            length: 0
#9# 0x38fb0661: 0x38fb0661 <JS Array[2]>
                 0: 0x41cb91f5 <JS Function>#10#
                 1: 0x38fada59 <an ExtendedHeader>#1#
#10# 0x41cb91f5: 0x41cb91f5 <JS Function>
#11# 0x38f556bd: 0x38f556bd <a Buffer>
            length: 16384
            parent: 0x38f60e09 <a SlowBuffer>#26#
            offset: 0
#12# 0x38f93a91: 0x38f93a91 <JS Function>
#13# 0x38fabf71: 0x38fabf71 <an Arguments>
            length: 1
            callee: 0x38f93f85 <JS Function>#36#
#14# 0x38f93f45: 0x38f93f45 <JS Function>
#15# 0x38fadb01: 0x38fadb01 <an Object>
              data: 0x2d575f75 <JS Function parse>#37#
               end: 0x38fada35 <JS Function>#38#
             pause: 0x38fae5c1 <JS Function>#39#
#16# 0x38fadb9d: 0x38fadb9d <JS Array[1]>
                 0: 0x38fb05c5 <a Buffer>#2#
#17# 0x38fadc09: 0x38fadc09 <JS Function>
            length: 0
#18# 0x38fadca9: 0x38fadca9 <an Object>
#19# 0x38fac43d: 0x38fac43d <a TarHeader>
             block: 0x38fac3d9 <a Buffer>#40#
        cksumValid: 0x258080b1 <true>
              path: 0x38fac5c9 <String[30]: PaxHeader/package/package.json>
              mode: 420
               uid: 0x38fad001 <Number: 1916975748>
               gid: 0x38fad139 <Number: 1700319516>
              size: 1677
             mtime: 0x38fad265 <Number: 1392064404>
             cksum: 7170
              type: 0x51615be5 <String[1]: x>
          linkpath: 0x5160812d <String[0]: >
             ustar: 0x38fad48d <String[6]\: ustar\x00>
          ustarver: 0x38fad4d5 <String[2]: 00>
             uname: 0x5160812d <String[0]: >
             gname: 0x5160812d <String[0]: >
            devmaj: 0
            devmin: 0
              fill: 0x5160812d <String[0]: >
#20# 0x38fadcd5: 0x38fadcd5 <an Object>
#21# 0x38fadd05: 0x38fadd05 <an Object>
#22# 0x38fae435: 0x38fae435 <an Object>
#23# 0x38fae4b5: 0x38fae4b5 <JS Array[0]>
#24# 0x38fae50d: 0x38fae50d <JS Array[3]>
                 0: 78
                 1: 79
                 2: 68
#25# 0x38fae52d: 0x38fae52d <JS Array[0]>
#26# 0x38f60e09: 0x38f60e09 <a SlowBuffer>
            length: 16384
#27# 0x38f430b5: 0x38f430b5 <an Object>
             entry: 0x38f519f9 <JS Array[3]>#41#
            unpipe: 0x38f51a09 <JS Function onunpipe>#42#
             drain: 0x38f51a2d <JS Function>#43#
             error: 0x38f51a51 <JS Array[3]>#44#
             close: 0x38f51a61 <JS Array[3]>#45#
            finish: 0x38f51a71 <JS Function g>#46#
              data: 0x38fac10d <JS Function ondata>#47#
               end: 0x38fac1c1 <JS Function cleanup>#48#
#28# 0x38f4d331: 0x38f4d331 <an Object>
#29# 0x38f4d33d: 0x38f4d33d <JS Array[1]>
                 0: 0x38f556bd <a Buffer>#11#
#30# 0x38f4d34d: 0x38f4d34d <a Buffer>
            length: 512
            parent: 0x38f08845 <a SlowBuffer>#49#
            offset: 2560
#31# 0x38f4d365: 0x38f4d365 <an Object>
             error: 0x38f556d5 <JS Function>#50#
              data: 0x38f556f9 <JS Function>#51#
               end: 0x38f5571d <JS Function>#52#
             drain: 0x38f55741 <JS Function>#53#
#32# 0x38f4d3a9: 0x38f4d3a9 <an Object>
             ready: 0x38f55779 <JS Function>#54#
             error: 0x38fac289 <JS Array[2]>#55#
             drain: 0x38fac211 <JS Array[2]>#56#
             close: 0x38fac381 <JS Array[2]>#57#
#33# 0x38f297e1: 0x38f297e1 <an Object>
              type: 0x3334e6ed <String[9]: Directory>
              path: 0x38f2898d <String[86]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules/underscore>
             strip: 1
               uid: 5000
               gid: 5000
            filter: 0x253df285 <JS Function>#35#
         Directory: 0x258080b1 <true>
              root: 0x25808081 <null>
            parent: 0x25808081 <null>
#34# 0x38f51b41: 0x38f51b41 <JS Array[0]>
#35# 0x253df285: 0x253df285 <JS Function>
#36# 0x38f93f85: 0x38f93f85 <JS Function>
#37# 0x2d575f75: 0x2d575f75 <JS Function parse>
#38# 0x38fada35: 0x38fada35 <JS Function>
#39# 0x38fae5c1: 0x38fae5c1 <JS Function>
#40# 0x38fac3d9: 0x38fac3d9 <a Buffer>
            length: 512
            parent: 0x38f60e09 <a SlowBuffer>#26#
            offset: 0
#41# 0x38f519f9: 0x38f519f9 <JS Array[3]>
                 0: 0x38f60cb9 <JS Function>#58#
                 1: 0x38f297bd <JS Function extractEntry>#59#
                 2: 0x38fac055 <JS Function>#60#
#42# 0x38f51a09: 0x38f51a09 <JS Function onunpipe>
#43# 0x38f51a2d: 0x38f51a2d <JS Function>
#44# 0x38f51a51: 0x38f51a51 <JS Array[3]>
                 0: 0x38f60d25 <JS Function onerror>#61#
                 1: 0x38f60db5 <JS Function>#62#
                 2: 0x38fac19d <JS Function onerror>#63#
#45# 0x38f51a61: 0x38f51a61 <JS Array[3]>
                 0: 0x38f60dd9 <JS Function g>#64#
                 1: 0x38f29749 <JS Function cb>#65#
                 2: 0x38fac1c1 <JS Function cleanup>#48#
#46# 0x38f51a71: 0x38f51a71 <JS Function g>
          listener: 0x38f60d6d <JS Function onfinish>#66#
#47# 0x38fac10d: 0x38fac10d <JS Function ondata>
#48# 0x38fac1c1: 0x38fac1c1 <JS Function cleanup>
#49# 0x38f08845: 0x38f08845 <a SlowBuffer>
            length: 8192
              used: 5248
#50# 0x38f556d5: 0x38f556d5 <JS Function>
#51# 0x38f556f9: 0x38f556f9 <JS Function>
#52# 0x38f5571d: 0x38f5571d <JS Function>
#53# 0x38f55741: 0x38f55741 <JS Function>
#54# 0x38f55779: 0x38f55779 <JS Function>
#55# 0x38fac289: 0x38fac289 <JS Array[2]>
                 0: 0x38f5579d <JS Function>#67#
                 1: 0x38fac19d <JS Function onerror>#63#
#56# 0x38fac211: 0x38fac211 <JS Array[2]>
                 0: 0x38f557c1 <JS Function>#68#
                 1: 0x38fac131 <JS Function ondrain>#69#
#57# 0x38fac381: 0x38fac381 <JS Array[2]>
                 0: 0x38f557e5 <JS Function>#70#
                 1: 0x38fac1c1 <JS Function cleanup>#48#
#58# 0x38f60cb9: 0x38f60cb9 <JS Function>
#59# 0x38f297bd: 0x38f297bd <JS Function extractEntry>
#60# 0x38fac055: 0x38fac055 <JS Function>
#61# 0x38f60d25: 0x38f60d25 <JS Function onerror>
#62# 0x38f60db5: 0x38f60db5 <JS Function>
#63# 0x38fac19d: 0x38fac19d <JS Function onerror>
#64# 0x38f60dd9: 0x38f60dd9 <JS Function g>
          listener: 0x38f60d49 <JS Function onclose>#71#
#65# 0x38f29749: 0x38f29749 <JS Function cb>
#66# 0x38f60d6d: 0x38f60d6d <JS Function onfinish>
#67# 0x38f5579d: 0x38f5579d <JS Function>
#68# 0x38f557c1: 0x38f557c1 <JS Function>
#69# 0x38fac131: 0x38fac131 <JS Function ondrain>
#70# 0x38f557e5: 0x38f557e5 <JS Function>
#71# 0x38f60d49: 0x38f60d49 <JS Function onclose>
=====================

Aborted
[  7.14 ######### ] ~ $

Even after clearing the cache (npm cache clean and changing ownership of all folders used by npm, the issue still persist.

My initial guess was probably node was failing to parse the received json data correctly, but all effort I have made seem not to do the trick.

解决方案

Thanks again smikes.

I tried the suggestion but that couldn't get it to work, so I eventually resulted to building from source again. My initial build was based on v0.10.35 so I decided to check the repo for version of nodejs that has a pre-built for arm. As at now, the latest version of nodejs is v0.11.14, but the version that has a pre-built binary for arm was v0.11.12

I then decided to go with v0.11.12 with the hope that if it was successfully compiled for arm-pi it might work for me to. I downloaded the source and extracted it.

To make life a bit easier and eventually avoid sudoing each time I use node and npm, I created a shebang like so (build.sh) and save at root directory of the extracted file. Since my architecture is arm based (version 7), I used the flag to guide my g++ and gcc appropriately.

#!/bin/bash
export CFLAGS='-march=armv7-a'
export CXXFLAGS='-march=armv7-a'
./configure --prefix=$HOME/local/nodejs
make install

I then make the build.sh file executable

sudo chmod a+x build.sh

The installation went successfully (took some hours to build though), by executing the build.sh file

./build.sh

I then exported NODE_PATH to my ~/.bashrc profile like so..

nano ~/.bashrc
export NODE=$HOME/local/nodejs
export NODE_PATH=$NODE/lib/node_modules
export PATH=$NODE/bin:$PATH

Quickly enabled the config

source ~/.bashrc

Then tested the installation

node -v

v0.11.12

npm -v

1.4.3

Finally update npm

npm -g install npm@latest
npm -v

2.1.18

这篇关于npm模块安装不断中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆