为JavaScript安装Quantlib

为JavaScript安装Quantlib

我正在尝试在Linux和Windows上为javascript安装quantlib。在这两种情况下,我都会遇到类似的错误。

[idf@node3 ql]$ sudo npm install quantlib
[sudo] password for idf:

> [email protected] postinstall /home/idf/Documents/js/node_modules/quantlib
> node-pre-gyp install

node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://github.com/quantlibnode/quantlibnode/releases/download/v0.2.1/linux-x64.tar.gz
node-pre-gyp ERR! stack     at Request.<anonymous> (/home/idf/Documents/js/node_modules/node-pre-gyp/lib/install.js:120:27)
node-pre-gyp ERR! stack     at emitOne (events.js:101:20)
node-pre-gyp ERR! stack     at Request.emit (events.js:188:7)
node-pre-gyp ERR! stack     at Request.onRequestResponse (/home/idf/Documents/js/node_modules/request/request.js:1029:10)
node-pre-gyp ERR! stack     at emitOne (events.js:96:13)
node-pre-gyp ERR! stack     at ClientRequest.emit (events.js:188:7)
node-pre-gyp ERR! stack     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:474:21)
node-pre-gyp ERR! stack     at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
node-pre-gyp ERR! stack     at TLSSocket.socketOnData (_http_client.js:363:20)
node-pre-gyp ERR! stack     at emitOne (events.js:96:13)
node-pre-gyp ERR! System Linux 3.10.0-229.1.2.el7.x86_64
node-pre-gyp ERR! command "/usr/bin/node" "/home/idf/Documents/js/node_modules/.bin/node-pre-gyp" "install"
node-pre-gyp ERR! cwd /home/idf/Documents/js/node_modules/quantlib
node-pre-gyp ERR! node -v v6.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.33
node-pre-gyp ERR! not ok
404 status code downloading tarball https://github.com/quantlibnode/quantlibnode/releases/download/v0.2.1/linux-x64.tar.gz
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open '/home/idf/Documents/js/package.json'
npm WARN js No description
npm WARN js No repository field.
npm WARN js No README data
npm WARN js No license field.
npm ERR! Linux 3.10.0-229.1.2.el7.x86_64
npm ERR! argv "/usr/bin/node" "/bin/npm" "install" "quantlib"
npm ERR! node v6.9.4
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node-pre-gyp install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node-pre-gyp install'.
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 quantlib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs quantlib
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls quantlib
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/idf/Documents/js/ql/npm-debug.log
[idf@node3 ql]$

最佳答案

您是否满足以下要求:
enter link description here

09-04 20:46