3

当我尝试安装 socket.io 时,我遇到了一堆错误。当找不到节点路径时,我不确定这意味着什么。终端输出如下,npm-debug 文件位于: http: //pastebin.com/B5TfUyWr。我已经删除了 node-modules 文件夹,并尝试重新安装 socket.io。我也尝试过全局安装,但这也不起作用。我将不胜感激任何人可能拥有的任何见解。

$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 hiredis@0.1.14 No README.md file found!

> hiredis@0.1.14 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  socket.io-client@0.9.10 { [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  socket.io@0.9.10 { [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!     <npm-@googlegroups.com>

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
4

2 回答 2

5

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

于 2012-10-18T05:47:34.833 回答
0

这是一个疯狂的猜测:

试试这个:

npm install --production socket.io
于 2012-10-17T03:02:19.830 回答