CentOS 6.4上的Mercurial + Apache

时间:2013-08-28 04:01:25

标签: mercurial hgweb

尝试配置apache / mercurial但遇到以下错误..

[Tue Aug 27 22:51:21 2013] [error] [client xxx.xxx.xxx.xxx] mod_wsgi (pid=32758): Target WSGI script '/var/www/vhosts/hg.xxxxx.net/cgi-bin/hgweb.wsgi' cannot be loaded as Python module.
[Tue Aug 27 22:51:21 2013] [error] [client xxx.xxx.xxx.xxx] mod_wsgi (pid=32758): Exception occurred processing WSGI script '/var/www/vhosts/hg.xxxxx.net/cgi-bin/hgweb.wsgi'.

用hello world测试脚本替换hgweb.wsgi按预期工作。所有软件均来自CentOS repos。

这是来自error.log

的回溯
[Tue Aug 27 22:57:59 2013] [error] Traceback (most recent call last):
[Tue Aug 27 22:57:59 2013] [error]   File "/var/www/vhosts/hg.xxxxx.net/cgi-bin/hgweb.wsgi", line 14, in <module>
[Tue Aug 27 22:57:59 2013] [error]     from mercurial import demandimport; demandimport.enable()
[Tue Aug 27 22:57:59 2013] [error] ImportError: No module named mercurial

1 个答案:

答案 0 :(得分:0)

回溯表明你没有安装在服务器上的mercurial(对于python),你需要在脚本可以使用它之前安装python绑定。

如果您没有管理员权限,则必须与管理员联系,否则您可以尝试在服务器上运行:

sudo pip install mercurial

更新

关于在centos上设置mercurial有一篇有趣的博客文章here,表明你需要从源代码安装和构建python mercurial绑定。