0

尝试在 Debian 上运行 xsp4 时出现此错误。

root@debian-x86:/opt# xsp
Handling exception type FileNotFoundException
Message is Could not load file or assembly 'Mono.WebServer2, Version=0.2.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
IsTerminating is set to True
System.IO.FileNotFoundException: Could not load file or assembly 'Mono.WebServer2, Version=0.2.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
File name: 'Mono.WebServer2, Version=0.2.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
  at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Mono.WebServer2, Version=0.2.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
File name: 'Mono.WebServer2, Version=0.2.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
  at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
  at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00000] in <filename unknown>:0 

我已将 mono 3.10.0 安装到 /opt/mono-3.10.0,我已将 xsp 3.0.11 安装到 /opt/xsp-3.0.11

我将这两个目录都添加到了我的 PATH 中:

/opt/mono-3.10.0/bin:/opt/xsp-3.0.11/bin

搜索文件系统显示 DLL 在 GAC 中(我相信?):

root@debian-x86:/opt# find /opt -name Mono.WebServer2.dll
/opt/xsp-3.0.11/lib/mono/2.0/Mono.WebServer2.dll
/opt/xsp-3.0.11/lib/mono/gac/Mono.WebServer2/0.2.0.0__0738eb9f132ed756/Mono.WebServer2.dll
/opt/xsp-3.0.11/lib/mono/gac/Mono.WebServer2/0.4.0.0__0738eb9f132ed756/Mono.WebServer2.dll
/opt/xsp-3.0.11/lib/mono/4.5/Mono.WebServer2.dll

我对 Linux 和 Mono 都是全新的,所以我在这里遗漏了一些东西?

lib路径是否必须进入某个环境变量?

4

1 回答 1

1

XSP 需要安装在与 mono 相同的前缀中,而不是安装在不同的前缀中。

于 2014-12-03T21:05:54.357 回答