0

そのため、Windows XP と Mercurial には Apache サーバーがあります。Mercurial スロー ブラウザに接続しようとすると、次のエラーが発生します。

[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 に答える