mod-mono不能在CentOS / Apache上运行

时间:2014-05-27 09:06:25

标签: apache mono mod-mono

我只是在我的CentOS盒子上设置mod-mono并配置Apache来提供.aspx页面,但是每当提供一个页面时它都会抛出错误。错误是:

System.IO.FileNotFoundException: Could not load file or assembly 'mod-mono-server2, Version=2.10.2.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
File name: 'mod-mono-server2, Version=2.10.2.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.ApplicationServer.GetApplicationForPath (System.String vhost, Int32 port, System.String path, Boolean defaultToRoot) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) Mono.WebServer.ApplicationServer:GetApplicationForPath (string,int,string,bool)
  at Mono.WebServer.ModMonoWorker.GetOrCreateApplication (System.String vhost, Int32 port, System.String filepath, System.String virt) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x00000] in <filename unknown>:0 
  at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x00000] in <filename unknown>:0 

我的单字母前缀为/opt/mono。如果我手动运行/opt/mono/bin/mod-mono-server2它会抛出相同的错误(它怎么能找不到自己?)。有关如何解决此问题的任何想法?应该注意的是,我在/usr/local中安装了并行单声道,但/opt/mono中首先PATH

编辑:我使用详细日志记录运行/opt/mono/bin/mod-mono-server2,我可以看到AOT尝试加载库并失败。以下是日志的粘贴:http://hastebin.com/cijubibefe.log

其中许多库没有共享目标文件。例如,/opt/mono/lib/mono/gac/System/2.0.0.0__b77a5c561934e089/System.dll存在(与System.dll.mdb一起),但/opt/mono/lib/mono/gac/System/2.0.0.0__b77a5c561934e089/System.dll.so不存在。

EDIT2:已解决

我只是想通了。不知何故,当我构建Mono,XSP和mod-mono时,我的前缀没有被用于部分构建序列,并且mod-mono-server2等可执行文件的启动脚本与/usr/local/bin/mono一起运行而不是/opt/mono/bin/mono,显然在GAC中没有mod-mono-server2。编辑所有启动脚本以使用/opt/mono/bin/mono解决了问题。

0 个答案:

没有答案