Mercurial CGI (hgweb.cgi) fails

早过忘川 提交于 2019-12-30 04:20:06

问题


I have Mercurial 1.8.1, Python 2.6.6 installed on Win 2k8 R2 running on a vm. I have tried installing from msi, source and using tortisehg. Command-line Hg works fine but I get the same error when running the hgweb.cgi:

Traceback (most recent call last):
  File ".\hgweb.cgi", line 17, in 
    application = hgweb(config)
  File "mercurial\hgweb\__init__.pyc", line 26, in hgweb

  File "mercurial\hgweb\hgwebdir_mod.pyc", line 61, in __init__

  File "mercurial\hgweb\hgwebdir_mod.pyc", line 70, in refresh

  File "mercurial\ui.pyc", line 35, in __init__

  File "mercurial\demandimport.pyc", line 75, in __getattribute__

  File "mercurial\demandimport.pyc", line 47, in _load

  File "mercurial\util.pyc", line 576, in 

  File "mercurial\demandimport.pyc", line 85, in _demandimport

  File "mercurial\windows.pyc", line 21, in 

  File "mercurial\demandimport.pyc", line 75, in __getattribute__

  File "mercurial\demandimport.pyc", line 47, in _load

  File "mercurial\osutil.pyc", line 12, in 

  File "mercurial\osutil.pyc", line 10, in __load

ImportError: DLL load failed: The specified module could not be found.

The other answers I have found on SO and elsewhere pointed me to try installing from source, dropping the pure osutil into the install, or installing an older version. I have tried them all.

This is especially frustrating because I have other, similar non-vm machines running fine but have been unable to find the disconnect.

Ideas?


回答1:


I had the same error using following system configuration

  • Python-2.6.6 installed as msi
  • mercurial-1.8.2-x86 installed as msi
  • IIS7

I solved this problem simply:

  1. Python has been installed early
  2. Uninstall Mercurial msi package
  3. Download and install "Mercurial-1.8.2 (32-bit py2.6)" installer from mercurial website which is marked as "This is recommended for hgweb setups".
  4. copyed content of C:\Python26\Lib\site-packages\mercurial\ to the directory used in IIS7 website setup.

Till now all is working. Hope this will help.




回答2:


Whenever I have less than descriptive error messages that tell me something is going on at the system level but not what, I use Sysinternals' Procmon to tell me what's going with the registry and filesystem. It's verbose, and getting the filter to show just the process of interest takes some learning, but you can export the results to Excel and skim them for suspicious-looking results. Pay particular attention to failures, of course.

Give it a try and see what DLL is being searched for.



来源:https://stackoverflow.com/questions/5318970/mercurial-cgi-hgweb-cgi-fails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!