Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux NodeJS中NPM的故障排除_Linux_Node.js_64 Bit_Npm_Oracle Enterprise Linux - Fatal编程技术网

Linux NodeJS中NPM的故障排除

Linux NodeJS中NPM的故障排除,linux,node.js,64-bit,npm,oracle-enterprise-linux,Linux,Node.js,64 Bit,Npm,Oracle Enterprise Linux,当我执行下面的命令时 npm install request 输出为: bash: npm: command not found 安装npm 通过 sudo curl http://npmjs.org/install.sh | sh 然后跑 npm install request 安装npm 通过 sudo curl http://npmjs.org/install.sh | sh 然后跑 npm install request 对于要安装请求模块的终端: npm install r

当我执行下面的命令时

npm install request
输出为:

bash: npm: command not found

安装
npm

通过

sudo curl http://npmjs.org/install.sh | sh
然后跑

npm install request

安装
npm

通过

sudo curl http://npmjs.org/install.sh | sh
然后跑

npm install request

对于要安装请求模块的终端:

npm install request
以下是输出

npm http GET https://registry.npmjs.org/request
npm ERR! Error: failed to fetch from registry: request
npm ERR!     at /opt/node0610/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR!     at cb (/opt/node0610/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:32:9)
npm ERR!     at Request._callback (/opt/node0610/lib/node_modules/npm/lib/utils /npm-registry-client/request.js:137:18)
npm ERR!     at Request.callback (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:109:22)
npm ERR!     at Request.<anonymous> (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:198:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest.<anonymous> (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:195:10)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at CleartextStream.<anonymous> (http.js:1134:11)
npm ERR!     at CleartextStream.emit (events.js:67:17)
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Linux 2.6.18-194.el5
npm ERR! command "node" "/opt/node0610/bin/npm" "install" "request"
npm ERR! cwd /home/applmgr
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! message failed to fetch from registry: request
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/applmgr/npm-debug.log
npm not ok
npmhttpgethttps://registry.npmjs.org/request
npm错误!错误:无法从注册表获取:请求
npm错误!at/opt/node0610/lib/node_modules/npm/lib/utils/npm registry client/get.js:139:12
npm错误!在cb(/opt/node0610/lib/node_modules/npm/lib/utils/npm registry client/request.js:32:9)
npm错误!应请求。_回调(/opt/node0610/lib/node_modules/npm/lib/utils/npm registry client/Request.js:137:18)
npm错误!at Request.callback(/opt/node0610/lib/node_modules/npm/node_modules/Request/main.js:109:22)
npm错误!应要求。(/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:198:58)
npm错误!at Request.emit(events.js:88:20)
npm错误!在ClientRequest。(/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:195:10)
npm错误!在ClientRequest.emit(events.js:67:17)
npm错误!在CleartextStream。(http.js:1134:11)
npm错误!在CleartextStream.emit(events.js:67:17)
npm错误!您可以在以下位置报告此日志:
npm错误!
npm错误!或通过电子邮件发送至:
npm错误!
npm错误!
npm错误!Linux系统2.6.18-194.el5
npm错误!命令“node”“/opt/node0610/bin/npm”“安装”“请求”
npm错误!cwd/home/applmgr
npm错误!节点-v v0.6.10
npm错误!npm-V1.1.0-3
npm错误!无法从注册表获取消息:请求
npm错误!
npm错误!其他日志记录详细信息可在以下位置找到:
npm错误/home/applmgr/npm-debug.log
npm不好
文件/home/applmgr/npm-debug.log的内容

info it worked if it ends with ok
verbose cli [ 'node', '/opt/node0610/bin/npm', 'install', 'request' ]
info using npm@1.1.0-3
info using node@v0.6.10
verbose config file /home/applmgr/.npmrc
verbose config file /opt/node0610/etc/npmrc
verbose config file /opt/node0610/lib/node_modules/npm/npmrc
verbose cache add [ 'request', null ]
silly cache add: name, spec, args [ undefined, 'request', [ 'request', null ] ]
verbose parsed url { pathname: 'request', path: 'request', href: 'request' }
verbose addNamed [ 'request', '' ]
verbose addNamed [ null, '' ]
silly name, range, hasData [ 'request', '', false ]
verbose raw, before any munging request
verbose url resolving [ 'https://registry.npmjs.org/', './request' ]
verbose url resolved https://registry.npmjs.org/request
http GET https://registry.npmjs.org/request
ERR! Error: failed to fetch from registry: request
ERR!     at /opt/node0610/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:139:12
ERR!     at cb (/opt/node0610/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:32:9)
ERR!     at Request._callback (/opt/node0610/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:137:18)
ERR!     at Request.callback (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:109:22)
ERR!     at Request.<anonymous> (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:198:58)
ERR!     at Request.emit (events.js:88:20)
ERR!     at ClientRequest.<anonymous> (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:195:10)
ERR!     at ClientRequest.emit (events.js:67:17)
ERR!     at CleartextStream.<anonymous> (http.js:1134:11)
ERR!     at CleartextStream.emit (events.js:67:17)
ERR! You may report this log at:
ERR!     <http://github.com/isaacs/npm/issues>
ERR! or email it to:
ERR!     <npm-@googlegroups.com>
ERR! 
ERR! System Linux 2.6.18-194.el5
ERR! command "node" "/opt/node0610/bin/npm" "install" "request"
ERR! cwd /home/applmgr
ERR! node -v v0.6.10
ERR! npm -v 1.1.0-3
ERR! message failed to fetch from registry: request
verbose exit [ 1, true ]
info如果它以ok结尾,它就工作了
详细cli['node','/opt/node0610/bin/npm','install','request']
信息使用npm@1.1.0-3
信息使用node@v0.6.10
详细配置文件/home/applmgr/.npmrc
详细配置文件/opt/node0610/etc/npmrc
详细配置文件/opt/node0610/lib/node_modules/npm/npmrc
详细缓存添加['request',null]
愚蠢的缓存添加:名称、规范、参数[未定义的'request',['request',null]]
详细解析的url{pathname:'request',path:'request',href:'request'}
详细地址命名['request','']
详细地址名为[null',]
愚蠢的名称、范围、hasData['request','',false]
详细的原始,在任何咀嚼请求之前
详细url解析['https://registry.npmjs.org/“,”./请求“]
已解析详细urlhttps://registry.npmjs.org/request
http获取https://registry.npmjs.org/request
犯错误错误:无法从注册表获取:请求
犯错误at/opt/node0610/lib/node_modules/npm/lib/utils/npm registry client/get.js:139:12
犯错误在cb(/opt/node0610/lib/node_modules/npm/lib/utils/npm registry client/request.js:32:9)
犯错误应请求。_回调(/opt/node0610/lib/node_modules/npm/lib/utils/npm registry client/Request.js:137:18)
犯错误at Request.callback(/opt/node0610/lib/node_modules/npm/node_modules/Request/main.js:109:22)
犯错误应要求。(/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:198:58)
犯错误at Request.emit(events.js:88:20)
犯错误在ClientRequest。(/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:195:10)
犯错误在ClientRequest.emit(events.js:67:17)
犯错误在CleartextStream。(http.js:1134:11)
犯错误在CleartextStream.emit(events.js:67:17)
犯错误您可以在以下位置报告此日志:
犯错误
犯错误或通过电子邮件发送至:
犯错误
犯错误
犯错误Linux系统2.6.18-194.el5
犯错误命令“node”“/opt/node0610/bin/npm”“安装”“请求”
犯错误cwd/home/applmgr
犯错误节点-v v0.6.10
犯错误npm-V1.1.0-3
犯错误无法从注册表获取消息:请求
详细退出[1,true]

对于要安装请求模块的终端:

npm install request
以下是输出

npm http GET https://registry.npmjs.org/request
npm ERR! Error: failed to fetch from registry: request
npm ERR!     at /opt/node0610/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR!     at cb (/opt/node0610/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:32:9)
npm ERR!     at Request._callback (/opt/node0610/lib/node_modules/npm/lib/utils /npm-registry-client/request.js:137:18)
npm ERR!     at Request.callback (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:109:22)
npm ERR!     at Request.<anonymous> (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:198:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest.<anonymous> (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:195:10)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at CleartextStream.<anonymous> (http.js:1134:11)
npm ERR!     at CleartextStream.emit (events.js:67:17)
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Linux 2.6.18-194.el5
npm ERR! command "node" "/opt/node0610/bin/npm" "install" "request"
npm ERR! cwd /home/applmgr
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! message failed to fetch from registry: request
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/applmgr/npm-debug.log
npm not ok
npmhttpgethttps://registry.npmjs.org/request
npm错误!错误:无法从注册表获取:请求
npm错误!at/opt/node0610/lib/node_modules/npm/lib/utils/npm registry client/get.js:139:12
npm错误!在cb(/opt/node0610/lib/node_modules/npm/lib/utils/npm registry client/request.js:32:9)
npm错误!应请求。_回调(/opt/node0610/lib/node_modules/npm/lib/utils/npm registry client/Request.js:137:18)
npm错误!at Request.callback(/opt/node0610/lib/node_modules/npm/node_modules/Request/main.js:109:22)
npm错误!应要求。(/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:198:58)
npm错误!at Request.emit(events.js:88:20)
npm错误!在ClientRequest。(/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:195:10)
npm错误!在ClientRequest.emit(events.js:67:17)
npm错误!在CleartextStream。(http.js:1134:11)
npm错误!在CleartextStream.emit(events.js:67:17)
npm错误!您可以在以下位置报告此日志:
npm错误!
npm错误!或通过电子邮件发送至:
npm错误!
npm错误!
npm错误!Linux系统2.6.18-194.el5
npm错误!命令“node”“/opt/node0610/bin/npm”“安装”“请求”
npm错误!cwd/home/applmgr
npm错误!节点-v v0.6.10
npm错误!npm-V1.1.0-3
npm错误!无法从注册表获取消息:请求
npm错误!
npm错误!其他日志记录详细信息可在以下位置找到:
npm错误/home/applmgr/npm-debug.log
npm不好
文件/home/applmgr/npm-debug.log的内容

info it worked if it ends with ok
verbose cli [ 'node', '/opt/node0610/bin/npm', 'install', 'request' ]
info using npm@1.1.0-3
info using node@v0.6.10
verbose config file /home/applmgr/.npmrc
verbose config file /opt/node0610/etc/npmrc
verbose config file /opt/node0610/lib/node_modules/npm/npmrc
verbose cache add [ 'request', null ]
silly cache add: name, spec, args [ undefined, 'request', [ 'request', null ] ]
verbose parsed url { pathname: 'request', path: 'request', href: 'request' }
verbose addNamed [ 'request', '' ]
verbose addNamed [ null, '' ]
silly name, range, hasData [ 'request', '', false ]
verbose raw, before any munging request
verbose url resolving [ 'https://registry.npmjs.org/', './request' ]
verbose url resolved https://registry.npmjs.org/request
http GET https://registry.npmjs.org/request
ERR! Error: failed to fetch from registry: request
ERR!     at /opt/node0610/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:139:12
ERR!     at cb (/opt/node0610/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:32:9)
ERR!     at Request._callback (/opt/node0610/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:137:18)
ERR!     at Request.callback (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:109:22)
ERR!     at Request.<anonymous> (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:198:58)
ERR!     at Request.emit (events.js:88:20)
ERR!     at ClientRequest.<anonymous> (/opt/node0610/lib/node_modules/npm/node_modules/request/main.js:195:10)
ERR!     at ClientRequest.emit (events.js:67:17)
ERR!     at CleartextStream.<anonymous> (http.js:1134:11)
ERR!     at CleartextStream.emit (events.js:67:17)
ERR! You may report this log at:
ERR!     <http://github.com/isaacs/npm/issues>
ERR! or email it to:
ERR!     <npm-@googlegroups.com>
ERR! 
ERR! System Linux 2.6.18-194.el5
ERR! command "node" "/opt/node0610/bin/npm" "install" "request"
ERR! cwd /home/applmgr
ERR! node -v v0.6.10
ERR! npm -v 1.1.0-3
ERR! message failed to fetch from registry: request
verbose exit [ 1, true ]
info如果它以ok结尾,它就工作了
详细cli['node','/opt/node0610/bin/npm','install','request']
信息使用npm@1.1.0-3
信息使用node@v0.6.10
详细配置文件/home/applmgr/.npmrc
详细配置文件/opt/node0610/etc/npmrc
详细配置文件/opt/node0610/lib/node_modules/npm/npmrc
详细缓存添加['request',null]
愚蠢的缓存添加:名称、规范、参数[未定义的'request',['request',null]]
详细解析的url{pathname:'request',path:'request',href:'request'}
详细地址命名['request','']
详细地址名为[null',]
愚蠢的名称、范围、hasData['request','',false]
详细的原始,在任何咀嚼请求之前
详细url解析['https://reg