0

所以在 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
4

1 回答 1

0

那是在告诉你 Mercurial 没有安装——至少它不在PYTHONPATH你的 python 实例正在使用的那个中。您似乎没有按照此处的说明将 Mercurial 库文件正确添加到您的 python 路径中:

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

于 2012-07-09T12:38:22.503 回答