无法在Mono/Linux上运行Kestrel

3

我想运行aspnet/Home示例中的ASP.NET5 MVC应用程序(kpm构建无误)。当我尝试运行k kestrel时,出现以下错误:

Mono: DllImport unable to load library 'libapi-ms-win-core-file-l1-2-0.dll: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden'.
Mono: DllImport unable to load library 'libapi-ms-win-core-file-l1-2-0.dll: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden'.
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) Microsoft.AspNet.Server.Kestrel.Networking.PlatformApis/LinuxApis.dlopen (string,int) <0xffffffff>
  at Microsoft.AspNet.Server.Kestrel.Networking.PlatformApis/LinuxApis.LoadLibrary (string) <0x0001b>
  at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.Load (string) <0x0002e>
  at Microsoft.AspNet.Server.Kestrel.KestrelEngine..ctor (Microsoft.Framework.Runtime.ILibraryManager) <0x0038f>
  at Kestrel.ServerFactory.Start (Microsoft.AspNet.Builder.IServerInformation,System.Func`2<object, System.Threading.Tasks.Task>) <0x0011f>
  at Microsoft.AspNet.Hosting.HostingEngine.Start (Microsoft.AspNet.Hosting.HostingContext) <0x001d4>
  at Microsoft.AspNet.Hosting.Program.Main (string[]) <0x00312>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000af>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x00046>
  at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly,string[],System.IServiceProvider) <0x000f7>
  at Microsoft.Framework.ApplicationHost.Program.ExecuteMain (Microsoft.Framework.Runtime.DefaultHost,string,string[]) <0x001eb>
  at Microsoft.Framework.ApplicationHost.Program.Main (string[]) <0x0035b>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this___object (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000af>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x00046>
  at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly,string[],System.IServiceProvider) <0x000f7>
  at kre.host.Bootstrapper.Main (string[]) <0x002c3>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this___object (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000af>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x00046>
  at kre.hosting.RuntimeBootstrapper.ExecuteAsync (string[]) <0x0139f>
  at kre.hosting.RuntimeBootstrapper.Execute (string[]) <0x0004b>
  at EntryPoint.Main (string[]) <0x00143>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono(mono_handle_native_sigsegv+0xf3) [0x811b9b3]
        mono(mono_arch_handle_altstack_exception+0xb4) [0x8167054]
        mono(mono_sigsegv_signal_handler+0x107) [0x8096627]
        [0xb779b40c]
        /lib/ld-linux.so.2(+0xe9f6) [0xb77aa9f6]
        /lib/ld-linux.so.2(+0x11ba8) [0xb77adba8]
        /usr/lib/i386-linux-gnu/libdl.so(+0xc2b) [0xb4963c2b]
        /lib/ld-linux.so.2(+0xdde6) [0xb77a9de6]
        /usr/lib/i386-linux-gnu/libdl.so(+0x10bc) [0xb49640bc]
        /usr/lib/i386-linux-gnu/libdl.so(dlopen+0x41) [0xb4963b61]
        [0xb4987a0c]
        [0xb4987994]
        [0xb4987607]
        [0xb4986f50]
        [0xb4986918]
        [0xb5272275]
        [0xb562bc5b]
        [0xb562b8ed]
        mono() [0x8096101]

Debug info from gdb:

系统是Debian 7.8 (x86),已安装libuv v1.0.0-rc2和mono 4.1。我试图让它正常运行,但却越来越疯狂。我检查了libuv库的权限,发现任何人都可以读取该库。我使用aspnet5的beta3版本。有人知道出了什么问题吗?我正在寻找提示以解决这个问题。


1
我有一个类似的问题。libuv.so.1在/usr/lib/中可用,但无法被Microsoft.AspNet.Server.Kestrel.Networking.Libuv.Load加载。 - Astaar
1个回答

1
如果您使用的是Mono 4.1,请安装dnvm而不是k。据我所知,Mono 3.12与k兼容,4.1与dnvm兼容。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接