0

我将 xsp4 从 4.0 复制到 4.5 并运行以下脚本:

exec /opt/mono/bin/mono $MONO_OPTIONS "/opt/mono/lib/mono/4.5/xsp4.exe" "$@"

给我错误:

[mono] /usr/local/src/xsp-2.10.2 @ xsp4
Could not load signature of Mono.WebServer.XSP.Server:RealMain due to: Could not load file or assembly or one of its dependencies.

Unhandled Exception:
System.TypeLoadException: A type load exception has occurred.
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: A type load exception has occurred.

单声道信息:

@ which mono
/opt/mono/bin/mono

@ mono --version
Mono JIT compiler version 3.2.6
# note I've compiled this with --with-libgdiplus=/opt/mono

有谁知道可能是什么问题?

4

1 回答 1

0

检查您是否将 LD_LIBRARY_PATH 环境变量设置为 /opt/mono/lib

检查 gac 中的 Mono.WebServer2 程序集

gacutil -l Mono.WebServer2

如果不是,请使用以下命令将其放在此处(您必须将目录更改为 xsp source xsp/src/Mono.WebServer/4.0

gacutil -i -package 4.5 Mono.WebServer2.dll 

如果这没有帮助,您可以使用 strace 命令运行 xsp4 以查看它尝试查找文件的位置和位置

strace -e trace=open xsp4.exe
于 2014-06-14T12:34:12.260 回答