本文介绍了socket.io安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试安装socket.io时,出现了很多错误.我不确定它找不到节点路径时的含义.终端输出在下面,npm-debug文件在以下位置: http://pastebin.com/B5TfUyWr .我已经删除了node-modules文件夹,并尝试重新安装socket.io.我也尝试过在全球范围内安装,但这也不起作用.我会很感激任何人可能提供的见识.

When I try to install socket.io, I'm getting a bunch of errors. I'm not sure what it means when it can't find the node path. The terminal output is below, and the npm-debug file is at: http://pastebin.com/B5TfUyWr. I've deleted the node-modules folder, and tried to reinstall socket.io. I've also tried to install globally, but that doesn't work, either. I'd appreciate any insight anybody might have.

$npm install socket.io
npm http GET https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io-client/0.9.10
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/redis/0.7.2
npm http 304 https://registry.npmjs.org/redis/0.7.2
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.10
npm http GET https://registry.npmjs.org/hiredis
npm http 304 https://registry.npmjs.org/hiredis
npm WARN package.json [email protected] No README.md file found!

> [email protected] preinstall /media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/redis/node_modules/hiredis
> make || gmake

cd deps/hiredis && make static
make[1]: Entering directory `/media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'
npmcc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
 http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
make[1]: Leaving directory `/media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'
node-waf configure build
Setting srcdir to                        : /media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/redis/node_modules/hiredis
Setting blddir to                        : /media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/redis/node_modules/hiredis/build
Checking for program g++ or c++          : /usr/bin/g++
Checking for program cpp                 : /usr/bin/cpp
Checking for program ar                  : /usr/bin/ar
Checking for program ranlib              : /usr/bin/ranlib
Checking for g++                         : ok
Checking for node path                   : not found
Checking for node prefix                 : ok /usr
'configure' finished successfully (0.213s)
Waf: Entering directory `/media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/redis/node_modules/hiredis/build'
[1/3] cxx: hiredis.cc -> build/Release/hiredis_1.o
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http 304 https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/zeparser/0.0.5
[2/3] cxx: reader.cc -> build/Release/reader_1.o
npm http 304 https://registry.npmjs.org/zeparser/0.0.5
[3/3] cxx_link: build/Release/hiredis_1.o build/Release/reader_1.o -> build/Release/hiredis.node
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
Waf: Leaving directory `/media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/redis/node_modules/hiredis/build'
'build' finished successfully (10.809s)
npm http 304 https://registry.npmjs.org/tinycolor
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/options
npm ERR! error rolling back Error: UNKNOWN, unlink '/media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/benchmark.html'
npm ERR! error rolling back  [email protected] { [Error: UNKNOWN, unlink '/media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/benchmark.html']
npm ERR! error rolling back   errno: -1,
npm ERR! error rolling back   code: 'UNKNOWN',
npm ERR! error rolling back   path: '/media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/benchmark.html' }
npm ERR! error rolling back Error: UNKNOWN, unlink '/media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/benchmark.html'
npm ERR! error rolling back  [email protected] { [Error: UNKNOWN, unlink '/media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/benchmark.html']
npm ERR! error rolling back   errno: -1,
npm ERR! error rolling back   code: 'UNKNOWN',
npm ERR! error rolling back   path: '/media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/benchmark.html' }
npm ERR! Error: EROFS, symlink '../ws/bin/wscat'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Linux 3.2.0-32-generic-pae
npm ERR! command "nodejs" "/usr/bin/npm" "install" "socket.io"
npm ERR! cwd /media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat
npm ERR! node -v v0.8.12
npm ERR! npm -v 1.1.63
npm ERR! path ../ws/bin/wscat
npm ERR! code EROFS
npm ERR! errno 56
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /media/sf_Data/webSites/exoLang/sites/all/modules/exoticlang_chat/npm-debug.log
npm ERR! not ok code 0

推荐答案

我的问题是Ubuntu无法在NTFS分区上编译或安装本机扩展.然后,我在Windows中安装了节点.因为我没有在Windows中安装编译器,所以它安装了(未编译?)扩展名. Ubuntu中的Node能够读取和使用这些扩展,对此感到高兴(我也是如此).

My problem was that Ubuntu couldn't compile or install native extensions on an NTFS partition. I then installed node in Windows. Because I didn't have the compilers installed in Windows, it installed the (non-compiled?) extensions. Node in Ubuntu was able to read and use those extensions, and it was happy (and so was I).

这篇关于socket.io安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 13:02