安装nodeshark时出错

时间:2016-06-17 16:27:31

标签: node.js npm wireshark

你好我从npmjs安装nodeshark,但我有错误:

    ubuntu@ubuntu:~/Documents$ sudo npm install nodeshark -g
    (node:8720) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

    > nodeshark@0.0.5 install /usr/local/lib/node_modules/nodeshark
    > node mnm.js build

    ERROR: Could not find "/usr/lib/i386-linux-gnu/glib-2.0/include" check GLIB_CONFIG_INCLUDE_DIR environment variable.
    npm ERR! Linux 4.4.0-22-generic
    npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "nodeshark" "-g"
    npm ERR! node v6.2.0
    npm ERR! npm  v3.8.9
    npm ERR! code ELIFECYCLE

    npm ERR! nodeshark@0.0.5 install: `node mnm.js build`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the nodeshark@0.0.5 install script 'node mnm.js build'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the nodeshark package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node mnm.js build
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs nodeshark
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls nodeshark
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR!     ubuntu@ubuntu:~/Documents/npm-debug.log

我曾尝试安装build-deb wireshark,但仍然没有工作。 似乎我需要i386才能工作,但我有这个:

Linux ubuntu 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

有人可以解释我如何解决这个问题吗?

1 个答案:

答案 0 :(得分:1)

看起来它无法找到或者没有线上的油嘴

ERROR: Could not find "/usr/lib/i386-     linux-gnu/glib-2.0/include

您应该确保该文件在指定的路径上可用,或者在环境变量中添加此文件的路径

如果您之前没有安装

sudo apt-get install libperl-dev

sudo apt-get install libgtk2.0-dev

另一种可能性是它与64位系统不兼容,如果这是真的,也可以在32位vm中运行它(如果你不打算重新安装32位分配,可能是最好的解决方案)< / p>

它正在寻找一个32位的库,但你正在运行一个64位版本的linux 您可以尝试将库路径更改为此库的版本

如果您尚未安装运行该软件,则需要mnm运行

npm install mnm