簡體   English   中英

在IIS7 64位上安裝Mercurial時出錯:“ DLL加載失敗:%1不是有效的Win32應用程序”

[英]Error while installing Mercurial on IIS7 64bit: “DLL Load Failed: %1 is not a valid Win32 application”

我正在使用此指南在IIS7網絡服務器上安裝Mercurial: http : //pteradigm.com/2012/09/16/mercurial-on-iis-7-x86-or-x64/#hg_iis_python

我正在使用以下版本:

  • 蟒蛇,2.7.6.amd64
  • pywin32-218.win-AMD64-py2.7
  • 水銀-2.8.2.tar
  • Windows Server 2008 R2

我已經將python和python \\ scripts文件夾添加到“路徑”環境變量中。

當我到達需要將hgwebdir_wsgi.py編譯為DLL的地步時,使用管理命令提示符,我嘗試編譯hgwebdir_wsgi.py並得到以下錯誤:

C:\inetpub\wwwroot\hg>python hgwebdir_wsgi.py
Traceback (most recent call last):
  File "hgwebdir_wsgi.py", line 73, in <module>
    application = hgwebdir(hgweb_config)
  File "C:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", line 89,
 in __init__
    self.refresh()
  File "C:\Python27\lib\site-packages\mercurial\hgweb\hgwebdir_mod.py", line 98,
 in refresh
    u = ui.ui()
  File "C:\Python27\lib\site-packages\mercurial\ui.py", line 45, in __init__
    for f in scmutil.rcpath():
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 102, in _
_getattribute__
    self._load()
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 74, in _l
oad
    mod = _hgextimport(_import, head, globals, locals, None, level)
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 43, in _h
gextimport
    return importfunc(name, globals, *args)
  File "C:\Python27\lib\site-packages\mercurial\scmutil.py", line 290, in <modul
e>
    class vfs(abstractvfs):
  File "C:\Python27\lib\site-packages\mercurial\scmutil.py", line 318, in vfs
    @util.propertycache
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 102, in _
_getattribute__
    self._load()
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 74, in _l
oad
    mod = _hgextimport(_import, head, globals, locals, None, level)
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 43, in _h
gextimport
    return importfunc(name, globals, *args)
  File "C:\Python27\lib\site-packages\mercurial\util.py", line 27, in <module>
    cachestat = platform.cachestat
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 102, in _
_getattribute__
    self._load()
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 74, in _l
oad
    mod = _hgextimport(_import, head, globals, locals, None, level)
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 43, in _h
gextimport
    return importfunc(name, globals, *args)
  File "C:\Python27\lib\site-packages\mercurial\windows.py", line 36, in <module
>
    posixfile.__doc__ = osutil.posixfile.__doc__
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 102, in _
_getattribute__
    self._load()
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 74, in _l
oad
    mod = _hgextimport(_import, head, globals, locals, None, level)
  File "C:\Python27\lib\site-packages\mercurial\demandimport.py", line 43, in _h
gextimport
    return importfunc(name, globals, *args)
ImportError: DLL load failed: %1 is not a valid Win32 application.

大部分相關問題的答案是32位和64位問題:但是,我使用了Python和Pywin的64位版本,並且從源頭上構建了Mercury(或者正在嘗試)。 為什么我的編譯失敗?

我無法解決此版本的Mercurial的問題。 最終成功的是

  1. 使用稍舊的Mercurial版本
  2. 一切都切換到32位。

即使我以前只小心安裝了64位版本,但我認為沿線某個地方添加了32位版本-至少,這就是我的假設,因為32位可以正常工作。 我懷疑較早版本的Mercurial是它起作用的原因,但我確實更改了版本,因此將其包括在我的答案中。

我對其他有此問題的人的建議:切換到統一的32位,而不管您的處理器如何。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM