1

我在安装闪亮服务器(R) 时遇到问题。按照https://github.com/rstudio/shiny-server/wiki/Building-Shiny-Server-from-Source上的安装说明进行操作时,在最后一步

(cd .. && ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js --python="$PYTHON" rebuild)

我收到以下错误:

node.js:134
    throw e; // process.nextTick error, or 'error' event on first tick
    ^
Error: Cannot find module '../package'
    at Function._resolveFilename (module.js:317:11)
    at Function._load (module.js:262:25)
    at require (module.js:346:19)
    at Object.<anonymous> (/store/opt/shiny-server/ext/node/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:78:17)
    at Module._compile (module.js:402:26)
    at Object..js (module.js:408:10)
    at Module.load (module.js:334:31)
    at Function._load (module.js:293:12)
    at require (module.js:346:19)
    at Object.<anonymous> (/store/opt/shiny-server/ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:13:11)

关于我应该做些什么来解决这个问题的任何建议?

更新:我使用的是 Ubuntu 11.10,所以我不能只安装预编译版本

4

1 回答 1

0

看到答案是你没有所有的构建必需品。
所以你需要安装以下东西:

  • Python
  • 制作
  • 海合会
  • 克++
  • 混帐

这是有关更多信息的文档。


具体到你提到的错误:

(cd .. && ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js --python="$PYTHON" 重建)

未安装 Python 或未设置环境$PYTHON
并确保安装了 python 2.x(真的。3.x 将无法工作)

于 2014-02-19T13:51:08.183 回答