【问题标题】:Installing node-xmpp on window 7在窗口 7 上安装 node-xmpp
【发布时间】:2013-02-25 09:23:24
【问题描述】:

我在 Windows 7 上有node --version v0.8.22。我正在尝试使用命令npm install node-xmpp 安装node-xmpp。我已经用npm install 安装了 express、log4js 和 socket.io,但是 node-xmpp 抛出了以下错误。

786 info preuninstall node-xmpp@0.3.2
787 info uninstall node-xmpp@0.3.2
788 verbose true,C:\www\resume-bootstrap\src\node_modules,C:\www\resume-bootstrap\src\node_modules unbuild node-xmpp@0.3.2
789 info postuninstall node-xmpp@0.3.2
790 error node-expat@2.0.0 install: `node-gyp rebuild`
790 error `cmd "/c" "node-gyp rebuild"` failed with 1
791 error Failed at the node-expat@2.0.0 install script.
791 error This is most likely a problem with the node-expat package,
791 error not with npm itself.
791 error Tell the author that this fails on your system:
791 error     node-gyp rebuild
791 error You can get their info via:
791 error     npm owner ls node-expat
791 error There is likely additional logging output above.
792 error System Windows_NT 6.1.7601
793 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-xmpp"
794 error cwd C:\www\resume-bootstrap\src
795 error node -v v0.8.22
796 error npm -v 1.2.14
797 error code ELIFECYCLE
798 verbose exit [ 1, true ]

你知道这是什么意思吗?

谢谢!

【问题讨论】:

    标签: node.js xmpp node-xmpp


    【解决方案1】:

    您需要确保首先安装了先决条件。 看看https://github.com/TooTallNate/node-gyp的安装说明

    由于它们有点混乱,我将在这里再次列出它们:

    1. 卸载您已安装的任何 Microsoft Visual C++ 2010 Redistributable。
    2. 安装 Python 2.7.3
    3. 安装 Microsoft Visual Studio C++ 2010 (Express)
    4. 安装 Windows 7 64 位 SDK
    5. 为 Windows SDK 7.1 安装编译器更新
    6. 安装 Microsoft Visual Studio C++ 2012 for Windows Desktop (Express)
    7. http://sourceforge.net/projects/expat/ 安装 libexpat

    这在 64 位 Win7 上非常适合我。如果您使用 32 位版本,则跳过第 4 点和第 5 点。

    我希望这能解决你的问题。

    【讨论】:

    • 感谢您的回答。测试后我会接受答案。
    猜你喜欢
    • 1970-01-01
    • 2017-09-30
    • 2018-03-05
    • 2018-11-06
    • 2018-09-09
    • 2020-11-28
    • 1970-01-01
    • 1970-01-01
    • 2023-01-30
    相关资源
    最近更新 更多