0

我正在 Linux 上安装 hubot,并按照说明进行操作,没有收到任何错误。

但是,当我尝试实际运行我的 hubot 时,我遇到了问题。首先,我尝试根据链接教程末尾的说明对 hubot 进行守护。start hubot返回错误start: Unknown job: hubot。所以我备份并尝试/opt/hubot/bin/hubot --name Ro\ Bot --adapter campfire并得到这一系列错误:

 /opt/hubot/bin/hubot: line 11: Hubot: command not found
/opt/hubot/bin/hubot: line 12: Fs: command not found
/opt/hubot/bin/hubot: line 13: Path: command not found
/opt/hubot/bin/hubot: line 14: HTTP: command not found
/opt/hubot/bin/hubot: line 15: Creator: command not found
/opt/hubot/bin/hubot: line 16: OptParse: command not found
/opt/hubot/bin/hubot: line 18: Switches: command not found
/opt/hubot/bin/hubot: line 19: [: missing `]'
/opt/hubot/bin/hubot: line 20: [: missing `]'
/opt/hubot/bin/hubot: line 21: [: missing `]'
/opt/hubot/bin/hubot: line 22: [: missing `]'
/opt/hubot/bin/hubot: line 23: [: missing `]'
/opt/hubot/bin/hubot: line 24: [: missing `]'
/opt/hubot/bin/hubot: line 25: [: missing `]'
/opt/hubot/bin/hubot: line 26: [: --version,: binary operator expected
/opt/hubot/bin/hubot: line 27: ]: command not found
/opt/hubot/bin/hubot: line 29: Options: command not found
/opt/hubot/bin/hubot: line 30: adapter:: command not found
/opt/hubot/bin/hubot: line 31: alias:: command not found
/opt/hubot/bin/hubot: line 32: create:: command not found
/opt/hubot/bin/hubot: line 33: enableHttpd:: command not found
/opt/hubot/bin/hubot: line 34: name:: command not found
/opt/hubot/bin/hubot: line 35: path:: command not found
/opt/hubot/bin/hubot: line 37: syntax error near unexpected token `('
/opt/hubot/bin/hubot: line 37: `Parser = new OptParse.OptionParser(Switches)'

尝试从发布包安装而不是在 git 中克隆会导致过程早期出现不同的错误:

root@server:/opt# wget https://github.com/downloads/github/hubot/hubot-2.2.0.tar.gz
root@server:/opt# npm install

npm ERR! Couldn't read dependencies.

npm ERR! Error: ENOENT, no such file or directory '/opt/package.json'
npm ERR! System Linux 2.6.35.4-rscloud
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /opt
npm ERR! node -v v0.6.9
npm ERR! npm -v 1.1.0-3
npm ERR! path /opt/package.json
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory '/opt/package.json'
npm ERR! errno {}
npm not ok

我试过npm cache clean但没有帮助。

我不知道该怎么做,而且我对 Hubot 或它运行的任何框架都不是很熟悉,因此任何有关如何开始对此进行故障排除的信息都会有所帮助。

4

2 回答 2

1

尝试从发布包安装(而不是从安装git clone),这为我解决了一些随机问题。

于 2012-09-27T07:54:24.917 回答
0

我怀疑您没有遵循上面引用的“将 Hubot 部署到 UNIX”链接的“安装依赖项”部分。具体来说,像 bash 这样的常规 shell 似乎试图解释脚本而不是咖啡脚本解释器。如果你输入

coffee

在您的 shell 提示符下,并且没有得到

coffee>

提示,请重新访问安装说明的第一部分。

于 2012-09-26T17:21:01.410 回答