Win XP上的Mercurial错误

时间:2012-07-09 11:43:11

标签: apache mercurial windows-xp

因此,Windows XP和Mercurial上有一台Apache服务器。当我尝试连接到mercuraial throw浏览器时,我有这个错误:

[Mon Jul 09 15:15:42 2012] [error] [client 141.206.207.61] Premature end of script headers: hgweb.cgi
[Mon Jul 09 15:15:42 2012] [error] [client 141.206.207.61] Traceback (most recent call last):\r
[Mon Jul 09 15:15:42 2012] [error] [client 141.206.207.61]   File "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/hgweb.cgi", line 16, in <module>\r
[Mon Jul 09 15:15:42 2012] [error] [client 141.206.207.61]     from mercurial import demandimport; demandimport.enable()\r
[Mon Jul 09 15:15:42 2012] [error] [client 141.206.207.61] ImportError: No module named mercurial\r
[Mon Jul 09 15:15:42 2012] [error] [client 141.206.207.61] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico

因为我是这个东西的新手,我不知道我应该做什么,或阅读。那么请你帮我。


[更新07 \ 11 \ 12]

我添加了Mercurial \ Lib的链接。现在它显示了另一个错误:

[Wed Jul 11 11:15:54 2012] [error] [client 141.206.207.61] Premature end of script headers: hgweb.cgi
[Wed Jul 11 11:15:54 2012] [error] [client 141.206.207.61] Traceback (most recent call last):\r
[Wed Jul 11 11:15:54 2012] [error] [client 141.206.207.61]   File "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/hgweb.cgi", line 23, in <module>\r
[Wed Jul 11 11:15:54 2012] [error] [client 141.206.207.61]     wsgicgi.launch(application)\r
[Wed Jul 11 11:15:54 2012] [error] [client 141.206.207.61]   File "mercurial\\hgweb\\wsgicgi.pyc", line 76, in launch\r
[Wed Jul 11 11:15:54 2012] [error] [client 141.206.207.61]   File "mercurial\\hgweb\\hgwebdir_mod.pyc", line 147, in __call__\r
[Wed Jul 11 11:15:54 2012] [error] [client 141.206.207.61]   File "mercurial\\hgweb\\hgwebdir_mod.pyc", line 177, in run_wsgi\r
[Wed Jul 11 11:15:54 2012] [error] [client 141.206.207.61]   File "mercurial\\hgweb\\hgwebdir_mod.pyc", line 371, in templater\r
[Wed Jul 11 11:15:54 2012] [error] [client 141.206.207.61]   File "mercurial\\templater.pyc", line 392, in stylemap\r
[Wed Jul 11 11:15:54 2012] [error] [client 141.206.207.61] RuntimeError: No hgweb templates found in []\r
[Wed Jul 11 11:15:54 2012] [error] [client 141.206.207.61] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
    enter code here

1 个答案:

答案 0 :(得分:0)

这告诉你没有安装Mercurial - 至少它不在你的python实例正在使用的PYTHONPATH中。看起来您没有按照此处的说明将Mercurial库文件正确添加到python路径:

https://www.mercurial-scm.org/wiki/HgWebDirStepByStep/#Mercurial_Lib_Files