7

mono-service を使用して Linux で Windows .NET-4.0 サービスを実行しようとしています。モノなどでコンパイルされていません。私は100%実行可能ではありませんが、試すことができると思いました(バイナリ互換など、実行可能だと思わますか?)。私が間違っている場合は修正してください。

一部のdllが見つからないというエラーが表示されます。それらはシステム内にありますが、見つかりません。これが1つです。

$ ldconfig -p | grep Posix
    libMonoPosixHelper.so (libc6,x86-64) => /usr/lib/libMonoPosixHelper.so

パスなどを追加してみましたが変わりません。

$ MONO_LOG_LEVEL=debug mono-service MyService.exe --debug > output.log

また

$ MONO_PATH=/usr/lib MONO_LOG_LEVEL=debug mono-service MyService.exe --debug > output.log

またはLD_LIBRARY_PATHが空だったので、試しました

export LD_LIBRARY_PATH=/usr/lib

出力では常に次のようになります。

Mono: DllImport attempting to load: 'libMonoPosixHelper.so'.
Mono: DllImport loading library: '/usr/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libMonoPosixHelper.so'.
Mono: DllImport error loading library '/usr/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libMonoPosixHelper.so: cannot open shared object file: No such file or directory'.
Mono: DllImport loading library: '/usr/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libMonoPosixHelper.so'.
Mono: DllImport error loading library '/usr/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libMonoPosixHelper.so: cannot open shared object file: No such file or directory'.
Mono: DllImport loading location: 'libMonoPosixHelper.so'.

したがって、基本パスでそれを見つけるのではなく、GAC を調べるだけです。なぜそこに見えないのですか?GAC の前に MONO_PATH を調べる必要がありますか? 何か不足していますか?

2 つの VM でテスト済み: Ubuntu 13.04 とクリーンなライブ Mint 14。

編集、情報追加 9/10:

わかりました、Ubuntuにはバージョン2.10か何かがありました。最新のソースで試しました

$ sudo ./autogen.sh --prefix=/usr/local
$ sudo make
$ sudo make install
$ mono --version
Mono JIT compiler version 3.2.1 (tarball Tue Sep 10 12:25:30 CEST 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    LLVM:          supported, not enabled.
    GC:            sgen
$ LD_LIBRARY_PATH=/usr/local/lib MONO_LOG_LEVEL=info mono-service MyService.exe --debug > output.log    

出力ログ:

Mono: Assembly Loader probing location: '/usr/lib/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/mscorlib.dll'.
Mono: Image addref mscorlib[0xdb0130] -> /usr/local/lib/mono/4.5/mscorlib.dll[0xdaf370]: 2
Mono: Assembly Loader probing location: '/usr/lib/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5/mscorlib.dll'.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/mscorlib.dll'.
Mono: AOT loaded AOT Module for /usr/local/lib/mono/4.5/mscorlib.dll.

Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/4.5/mscorlib.dll'.
Mono: Config attempting to parse: '/usr/local/lib/mono/4.5/mscorlib.dll.config'.
Mono: Config attempting to parse: '/usr/local/etc/mono/assemblies/mscorlib/mscorlib.config'.
Mono: GC_MAJOR: (mature allocation failure) pause 0.16ms, total 0.16ms, bridge 0.00 major 96K/32K los 0K/0K
Mono: Assembly mscorlib[0xdb0130] added to domain mono-service.exe, ref_count=1
Mono: Config attempting to parse: '/usr/local/etc/mono/config'.
Mono: Config attempting to parse: '/home/ejpb/.mono/config'.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/mono-service.exe'.
Mono: Image addref mono-service[0xdf0660] -> /usr/local/lib/mono/4.5/mono-service.exe[0xdae210]: 3
Mono: Assembly mono-service[0xdf0660] added to domain mono-service.exe, ref_count=1
Mono: AOT failed to load AOT module /usr/local/lib/mono/4.5/mono-service.exe.so: /usr/local/lib/mono/4.5/mono-service.exe.so: cannot open shared object file: No such file or directory

Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/4.5/mono-service.exe'.
Mono: Config attempting to parse: '/usr/local/lib/mono/4.5/mono-service.exe.config'.
Mono: Config attempting to parse: '/usr/local/etc/mono/assemblies/mono-service/mono-service.config'.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/mono-service.exe'.
Mono: AOT failed to load AOT module /usr/local/lib/mono/4.5/mono-service.exe.so: /usr/local/lib/mono/4.5/mono-service.exe.so: cannot open shared object file: No such file or directory

Mono: Assembly Ref addref mono-service[0xdf0660] -> mscorlib[0xdb0130]: 2
Mono: Config attempting to parse: '/usr/local/lib/mono/4.5/mono-service.exe.config'.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/Mono.Posix.dll'.
Mono: Image addref Mono.Posix[0xe0bba0] -> /usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll[0xe0ae00]: 2
Mono: Assembly Mono.Posix[0xe0bba0] added to domain mono-service.exe, ref_count=1
Mono: AOT failed to load AOT module /usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so: /usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so: cannot open shared object file: No such file or directory

Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/4.5/Mono.Posix.dll'.
Mono: Config attempting to parse: '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.config'.
Mono: Config attempting to parse: '/usr/local/etc/mono/assemblies/Mono.Posix/Mono.Posix.config'.
Mono: Assembly Ref addref mono-service[0xdf0660] -> Mono.Posix[0xe0bba0]: 2
Mono: Assembly Ref addref Mono.Posix[0xe0bba0] -> mscorlib[0xdb0130]: 3
Mono: DllImport attempting to load: 'libc.so.6'.
Mono: DllImport error loading library '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libc.so.6': '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libc.so.6: cannot open shared object file: No such file or directory'.
Mono: DllImport error loading library '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libc.so.6.so': '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libc.so.6.so: cannot open shared object file: No such file or directory'.
Mono: DllImport loaded library 'libc.so.6'.
Mono: DllImport searching in: 'libc.so.6' ('libc.so.6').
Mono: Searching for 'chdir'.
Mono: Probing 'chdir'.
Mono: Found as 'chdir'.
Mono: DllImport attempting to load: 'libMonoPosixHelper.so'.
Mono: DllImport error loading library '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libMonoPosixHelper.so': '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libMonoPosixHelper.so: cannot open shared object file: No such file or directory'.
Mono: DllImport error loading library '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libMonoPosixHelper.so': '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/libMonoPosixHelper.so: cannot open shared object file: No such file or directory'.
Mono: DllImport loaded library 'libMonoPosixHelper.so'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Syscall_open_mode'.
Mono: Probing 'Mono_Posix_Syscall_open_mode'.
Mono: Found as 'Mono_Posix_Syscall_open_mode'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Syscall_lockf'.
Mono: Probing 'Mono_Posix_Syscall_lockf'.
Mono: Found as 'Mono_Posix_Syscall_lockf'.
Mono: DllImport searching in: 'libc.so.6' ('libc.so.6').
Mono: Searching for 'getpid'.
Mono: Probing 'getpid'.
Mono: Found as 'getpid'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Syscall_write'.
Mono: Probing 'Mono_Posix_Syscall_write'.
Mono: Found as 'Mono_Posix_Syscall_write'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Syscall_get_at_fdcwd'.
Mono: Probing 'Mono_Posix_Syscall_get_at_fdcwd'.
Mono: Found as 'Mono_Posix_Syscall_get_at_fdcwd'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Syscall_L_ctermid'.
Mono: Probing 'Mono_Posix_Syscall_L_ctermid'.
Mono: Found as 'Mono_Posix_Syscall_L_ctermid'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Syscall_L_cuserid'.
Mono: Probing 'Mono_Posix_Syscall_L_cuserid'.
Mono: Found as 'Mono_Posix_Syscall_L_cuserid'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Syscall_get_utime_now'.
Mono: Probing 'Mono_Posix_Syscall_get_utime_now'.
Mono: Found as 'Mono_Posix_Syscall_get_utime_now'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Syscall_get_utime_omit'.
Mono: Probing 'Mono_Posix_Syscall_get_utime_omit'.
Mono: Found as 'Mono_Posix_Syscall_get_utime_omit'.
Mono: DllImport searching in: 'libc.so.6' ('libc.so.6').
Mono: Searching for 'free'.
Mono: Probing 'free'.
Mono: Found as 'free'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_malloc'.
Mono: Probing 'Mono_Posix_Stdlib_malloc'.
Mono: Found as 'Mono_Posix_Stdlib_malloc'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_SIG_DFL'.
Mono: Probing 'Mono_Posix_Stdlib_SIG_DFL'.
Mono: Found as 'Mono_Posix_Stdlib_SIG_DFL'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_SIG_ERR'.
Mono: Probing 'Mono_Posix_Stdlib_SIG_ERR'.
Mono: Found as 'Mono_Posix_Stdlib_SIG_ERR'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_SIG_IGN'.
Mono: Probing 'Mono_Posix_Stdlib_SIG_IGN'.
Mono: Found as 'Mono_Posix_Stdlib_SIG_IGN'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib__IOFBF'.
Mono: Probing 'Mono_Posix_Stdlib__IOFBF'.
Mono: Found as 'Mono_Posix_Stdlib__IOFBF'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib__IOLBF'.
Mono: Probing 'Mono_Posix_Stdlib__IOLBF'.
Mono: Found as 'Mono_Posix_Stdlib__IOLBF'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib__IONBF'.
Mono: Probing 'Mono_Posix_Stdlib__IONBF'.
Mono: Found as 'Mono_Posix_Stdlib__IONBF'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_BUFSIZ'.
Mono: Probing 'Mono_Posix_Stdlib_BUFSIZ'.
Mono: Found as 'Mono_Posix_Stdlib_BUFSIZ'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_EOF'.
Mono: Probing 'Mono_Posix_Stdlib_EOF'.
Mono: Found as 'Mono_Posix_Stdlib_EOF'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_FOPEN_MAX'.
Mono: Probing 'Mono_Posix_Stdlib_FOPEN_MAX'.
Mono: Found as 'Mono_Posix_Stdlib_FOPEN_MAX'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_FILENAME_MAX'.
Mono: Probing 'Mono_Posix_Stdlib_FILENAME_MAX'.
Mono: Found as 'Mono_Posix_Stdlib_FILENAME_MAX'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_L_tmpnam'.
Mono: Probing 'Mono_Posix_Stdlib_L_tmpnam'.
Mono: Found as 'Mono_Posix_Stdlib_L_tmpnam'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_stderr'.
Mono: Probing 'Mono_Posix_Stdlib_stderr'.
Mono: Found as 'Mono_Posix_Stdlib_stderr'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_stdin'.
Mono: Probing 'Mono_Posix_Stdlib_stdin'.
Mono: Found as 'Mono_Posix_Stdlib_stdin'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_stdout'.
Mono: Probing 'Mono_Posix_Stdlib_stdout'.
Mono: Found as 'Mono_Posix_Stdlib_stdout'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_TMP_MAX'.
Mono: Probing 'Mono_Posix_Stdlib_TMP_MAX'.
Mono: Found as 'Mono_Posix_Stdlib_TMP_MAX'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_EXIT_FAILURE'.
Mono: Probing 'Mono_Posix_Stdlib_EXIT_FAILURE'.
Mono: Found as 'Mono_Posix_Stdlib_EXIT_FAILURE'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_EXIT_SUCCESS'.
Mono: Probing 'Mono_Posix_Stdlib_EXIT_SUCCESS'.
Mono: Found as 'Mono_Posix_Stdlib_EXIT_SUCCESS'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_MB_CUR_MAX'.
Mono: Probing 'Mono_Posix_Stdlib_MB_CUR_MAX'.
Mono: Found as 'Mono_Posix_Stdlib_MB_CUR_MAX'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Stdlib_RAND_MAX'.
Mono: Probing 'Mono_Posix_Stdlib_RAND_MAX'.
Mono: Found as 'Mono_Posix_Stdlib_RAND_MAX'.
Mono: Assembly mscorlib[0xdb0130] added to domain MyService.exe, ref_count=4
Mono: Config attempting to parse: '/home/ejpb/mono-3.2.1/MyService.exe.config'.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll'.
Mono: Image addref Mono.Security[0xf159c0] -> /usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll[0xf296f0]: 2
Mono: Assembly Mono.Security[0xf159c0] added to domain MyService.exe, ref_count=1
Mono: AOT failed to load AOT module /usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so: /usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so: cannot open shared object file: No such file or directory

Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll'.
Mono: Config attempting to parse: '/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.config'.
Mono: Config attempting to parse: '/usr/local/etc/mono/assemblies/Mono.Security/Mono.Security.config'.
Mono: Assembly Ref addref Mono.Security[0xf159c0] -> mscorlib[0xdb0130]: 5
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/Mono.Security.dll'.
Mono: Unloading image /usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll [0x1003f10].
Mono: Assembly Mono.Security[0xf159c0] added to domain mono-service.exe, ref_count=2
Mono: AOT failed to load AOT module /usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so: /usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll.so: cannot open shared object file: No such file or directory

Mono: Assembly Loader probing location: '/usr/local/lib/mono/gac/mono-service/4.0.0.0__0738eb9f132ed756/mono-service.dll'.
Mono: Assembly Loader probing location: '/usr/local/lib/mono-service.dll'.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/4.5/Facades/mono-service.dll'.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/gac/mono-service/4.0.0.0__0738eb9f132ed756/mono-service.exe'.
Mono: Image addref mono-service[0x109a0b0] -> /usr/local/lib/mono/gac/mono-service/4.0.0.0__0738eb9f132ed756/mono-service.exe[0x106e200]: 2
Mono: Assembly mono-service[0x109a0b0] added to domain MyService.exe, ref_count=1
Mono: AOT failed to load AOT module /usr/local/lib/mono/gac/mono-service/4.0.0.0__0738eb9f132ed756/mono-service.exe.so: /usr/local/lib/mono/gac/mono-service/4.0.0.0__0738eb9f132ed756/mono-service.exe.so: cannot open shared object file: No such file or directory

Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/gac/mono-service/4.0.0.0__0738eb9f132ed756/mono-service.exe'.
Mono: Config attempting to parse: '/usr/local/lib/mono/gac/mono-service/4.0.0.0__0738eb9f132ed756/mono-service.exe.config'.
Mono: Config attempting to parse: '/usr/local/etc/mono/assemblies/mono-service/mono-service.config'.
Mono: Assembly Ref addref mono-service[0x109a0b0] -> mscorlib[0xdb0130]: 6
Mono: Assembly Loader probing location: '/usr/local/lib/mono/gac/System.ServiceProcess/4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll'.
Mono: Image addref System.ServiceProcess[0x10bf5f0] -> /usr/local/lib/mono/gac/System.ServiceProcess/4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll[0x10be7a0]: 2
Mono: Assembly System.ServiceProcess[0x10bf5f0] added to domain MyService.exe, ref_count=1
Mono: AOT failed to load AOT module /usr/local/lib/mono/gac/System.ServiceProcess/4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll.so: /usr/local/lib/mono/gac/System.ServiceProcess/4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll.so: cannot open shared object file: No such file or directory

Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/gac/System.ServiceProcess/4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll'.
Mono: Config attempting to parse: '/usr/local/lib/mono/gac/System.ServiceProcess/4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll.config'.
Mono: Config attempting to parse: '/usr/local/etc/mono/assemblies/System.ServiceProcess/System.ServiceProcess.config'.
Mono: Assembly Ref addref mono-service[0x109a0b0] -> System.ServiceProcess[0x10bf5f0]: 2
Mono: Assembly Loader probing location: '/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll'.
Mono: Image addref System[0x10c0fc0] -> /usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll[0x10c0290]: 2
Mono: Assembly System[0x10c0fc0] added to domain MyService.exe, ref_count=1
Mono: AOT failed to load AOT module /usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.so: /usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.so: cannot open shared object file: No such file or directory

Mono: Assembly Loader loaded assembly from location: '/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll'.
Mono: Config attempting to parse: '/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll.config'.
Mono: Config attempting to parse: '/usr/local/etc/mono/assemblies/System/System.config'.
Mono: Assembly Ref addref System.ServiceProcess[0x10bf5f0] -> System[0x10c0fc0]: 2
Mono: Assembly Ref addref System[0x10c0fc0] -> mscorlib[0xdb0130]: 7
Mono: Assembly Ref addref System.ServiceProcess[0x10bf5f0] -> mscorlib[0xdb0130]: 8
Mono: Assembly Loader probing location: 'MyService.exe'.
Mono: Assembly Loader probing location: '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll'.
Mono: Assembly Mono.Posix[0xe0bba0] added to domain MyService.exe, ref_count=3
Mono: AOT failed to load AOT module /usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so: /usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so: cannot open shared object file: No such file or directory

Mono: Assembly Ref addref mono-service[0x109a0b0] -> Mono.Posix[0xe0bba0]: 4
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_Syscall_syslog'.
Mono: Probing 'Mono_Posix_Syscall_syslog'.
Mono: Found as 'Mono_Posix_Syscall_syslog'.
Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').
Mono: Searching for 'Mono_Posix_FromSyslogLevel'.
Mono: Probing 'Mono_Posix_FromSyslogLevel'.
Mono: Found as 'Mono_Posix_FromSyslogLevel'.
Mono: GC_MAJOR: (user request) pause 1.18ms, total 1.20ms, bridge 0.00 major 704K/272K los 50K/120K
Mono: Unloading domain mono-service.exe[0xdaafb0], assembly __MetadataTypes[0x1025240], ref_count=1
Mono: Unloading assembly __MetadataTypes [0x1025240].
Mono: Unloading image __MetadataTypes [0x1003fc0].
Mono: Unloading image __MetadataTypes [0x102dba0].
Mono: Unloading domain mono-service.exe[0xdaafb0], assembly mscorlib[0xdb0130], ref_count=8
Mono: Unloading domain mono-service.exe[0xdaafb0], assembly mono-service[0xdf0660], ref_count=1
Mono: Unloading assembly mono-service [0xdf0660].
Mono: Unloading domain mono-service.exe[0xdaafb0], assembly Mono.Posix[0xe0bba0], ref_count=4
Mono: Unloading domain mono-service.exe[0xdaafb0], assembly Mono.Security[0xf159c0], ref_count=2
Mono: Unloading image /usr/local/lib/mono/4.5/mono-service.exe [0xdae210].
Mono: Assembly image '/usr/local/lib/mono/gac/System.ServiceProcess/4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll' still loaded at shutdown.
Mono: Assembly image '/usr/local/lib/mono/4.5/mscorlib.dll' still loaded at shutdown.
Mono: Assembly image '/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll' still loaded at shutdown.
Mono: Assembly image '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll' still loaded at shutdown.
Mono: Assembly image '/usr/local/lib/mono/4.5/mscorlib.dll' still loaded at shutdown.
Mono: Assembly image '/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll' still loaded at shutdown.
Mono: Assembly image '/usr/local/lib/mono/gac/mono-service/4.0.0.0__0738eb9f132ed756/mono-service.exe' still loaded at shutdown.
Mono: Assembly image '/usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll' still loaded at shutdown.
Mono: Assembly image '/usr/local/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll' still loaded at shutdown.
Mono: Assembly image '/usr/local/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll' still loaded at shutdown.
Mono: Assembly image '/usr/local/lib/mono/gac/System.ServiceProcess/4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll' still loaded at shutdown.

良くなったように見えますが、まだシャットダウンしています。

ログの最後にlibMonoPosixHelper が見つかり
Mono: DllImport loaded library 'libMonoPosixHelper.so'.
ますが、Posix では失敗し
Mono: AOT failed to load AOT module /usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so: /usr/local/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll.so: cannot open shared object file: No such file or directory
ます。それがシャットダウンの原因となる主なエラーですか?
Mono.Posix.dll は以前にロードされています... ログを読んでいるときに何かが欠けているかどうかはわかりません。

9/30編集

OK、CrunchBang vm で試してみましたが、Mono はありません。接頭辞 /home/ejpb/mono でインストールされた tarball (必要なスペース、/home パーティション上)。
質問:私はそれを正しくやっていますか?Windows のインストール ディレクトリから exe と dll をコピーしました。どうにかして Linux で msi ファイルを使用できますか (そこから抽出します)? それは何かを変えるでしょうか?
走った

LD_LIBRARY_PATH=/home/ejpb/mono/lib MONO_LOG_LEVEL=debug mono-service -v /home/ejpb/MyService/MyService.exe --debug > out.log 

そしてout.logに入った:

Mono: DllImport searching in: 'libMonoPosixHelper.so' ('libMonoPosixHelper.so').  
Mono: Searching for 'Mono_Posix_Stdlib_RAND_MAX'.  
Mono: Probing 'Mono_Posix_Stdlib_RAND_MAX'.  
Mono: Found as 'Mono_Posix_Stdlib_RAND_MAX'.  

など、その部分は今では問題ないようです。

また、かなりの数の「見つかりません」
Mono: AOT NOT FOUND: System.Security.Cryptography.RNGCryptoServiceProvider:RngClose (intptr) を取得しました。
Mono: AOT が見つかりません: System.Threading.InternalThread:Thread_free_internal (intptr)。

MoMA - Mono 2.8 (4.0 Profile) を試してみました。それは 3.2.3 でも正確ですか?
私が得た:

Assembly                  Version    Missing  Not Implemented  Todo  P/Invoke  
Apache.NMS.ActiveMQ.dll   1.5.3.2578    0            4          11       0  
Apache.NMS.dll            1.5.0.2194    0            0           4       0  
log4net.dll               1.2.11.0      0            0           6       3  
MyServiceUtils.dll        1.0.0.0       1            0           0       0  
MyService.exe             1.0.0.0       0            0           1       0  

おそらく、このサービスを実行することはできませんか? log4net にはいくつかの p/invoke などがあります。

4

1 に答える 1

0

sudo apt-get install mono-complete を使用して mono をインストールした場合は、mscorlib を参照することをお勧めします。

Mono は 4.0 ではなく mscorlib.dll 2.0 を使用します

Mono で .net アプリを実行できません - mscorlib.dll が見つかりません (バージョンが一致しませんか?)

役に立つかもしれません。

于 2014-02-05T11:53:26.880 に答える