如何正确安装node_rrd?

How to install node_rrd correctly?

如果我在这里问这个问题,那是因为我正在使用 MeteorJS 并且我需要使用 RRD。我创建了一个 node_rrd,可以做我需要做的一切 here

问题是我已经在终端中安装了所有这些东西:

 brew install rrdtool  
 meteor npm install rrd  
 meteor npm install rrdtool
 meteor npm install node-rrdtool

我做了以下安装,因为在 dependencies 他们说我需要做 :

 meteor npm install -g node-gyp

当我做 console.log(rrd)我有这个:

 { RRD: { [Function: RRD] restore: [Function] } }

但是当我想像 basic usage 那样创建文件时,我有一个错误 rrd.create is not a function

所以我的问题是这里有人已经在 nodeJS 上使用 RRD 了吗?或者有人知道如何安装 node_rrd ?

如果您阅读 github 页面上的 RRD 说明,您将看到:

Using git

$ git clone <this repository>
$ cd node_rrd
$ npm install .

基本上您需要将存储库下载到您的本地计算机并构建它。您在设置 gyp 方面走在正确的轨道上,但不要为此使用 meteor npm,它需要对您的计算机是全局的,所以这样做:

sudo npm install -g node-gyp

sudo 是可选的,我想如果你在 Windows。如果您需要更多帮助,请告诉我