Mercurial CGI (hgweb.cgi) 失败

发布于 2024-10-23 19:52:53 字数 1172 浏览 4 评论 0原文

我在虚拟机上运行的 Win 2k8 R2 上安装了 Mercurial 1.8.1、Python 2.6.6。我尝试过从 msi、源代码和使用 tortisehg 安装。命令行 Hg 工作正常,但运行 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.

我在 SO 和其他地方找到的其他答案指出我尝试从源代码安装,将纯 osutil 放入安装中,或安装旧版本。我都试过了。

这尤其令人沮丧,因为我有其他类似的非虚拟机运行良好,但无法找到断开连接。

有想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

终难遇 2024-10-30 19:52:54

我使用以下系统配置遇到了同样的错误

  • Python-2.6.6 安装为 msi
  • Mercurial-1.8.2-x86 安装为 msi
  • IIS7

我简单地解决了这个问题:

  1. Python 已提前安装
  2. 卸载 Mercurial msi 包
  3. 下载并安装“Mercurial-1.8 .2(32 位 py2.6)”来自 mercurial 网站 的安装程序被标记为“推荐用于 hgweb 设置”。
  4. 将 C:\Python26\Lib\site-packages\mercurial\ 的内容复制到 IIS7 网站设置中使用的目录。

到目前为止一切正常。希望这会有所帮助。

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.

画离情绘悲伤 2024-10-30 19:52:54

每当我收到描述性错误消息,告诉我系统级别发生了一些事情,但不告诉我是什么事情时,我会使用 Sysinternals 的 Procmon 告诉我注册表和文件系统的情况。它很冗长,并且让过滤器仅显示感兴趣的过程需要一些学习,但您可以将结果导出到 Excel 并浏览它们以查找可疑的结果。当然,要特别注意失败。

尝试一下,看看正在搜索什么 DLL。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文