gpt4 book ai didi

mono - Kestrel 命令抛出无法加载 libuv。确保 libuv 已安装并可用作 libuv.so.1

转载 作者:太空宇宙 更新时间:2023-11-03 17:17:53 32 4
gpt4 key购买 nike

我正在尝试运行来自 https://github.com/aspnet/home 的示例

我遵循了 documentation 中的所有步骤但我无法让它发挥作用。

我正在运行 dnx 。 kestrel(在CentOS上),错误是:

System.InvalidOperationException: Unable to load libuv. Make sure libuv is installed and available as libuv.so.1
at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.Load (System.String dllToLoad) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Server.Kestrel.KestrelEngine..ctor (ILibraryManager libraryManager, IApplicationShutdown appShutdownService) [0x00000] in <filename unknown>:0
at Kestrel.ServerFactory.Start (IServerInformation serverInformation, System.Func`2 application) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Hosting.Internal.HostingEngine.Start () [0x00000] in <filename unknown>:0

我在 /usr/local/lib 中有 libuv.so.1.0.0

[/usr/local/lib]$ ls
libuv.a libuv.la libuv.so libuv.so.1 libuv.so.1.0.0 pkgconfig

我还在 /usr/lib/usr/lib64 中添加了 libuv.so.1 的符号链接(symbolic link)

我什至检查了kestrel's source code但我找不到问题所在。

我错过了什么?

最佳答案

设置库加载器路径以包括您的本地库目录和 Libuv.cs 中的 LoadLibrary应该找到它:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
dnx . kestrel

man dlopen 了解更多详情:

Linux Shared Library Search Path
From the dlopen(3) man page, the necessary shared libraries needed by the program are searched for in the following order:

1) A colon-separated list of directories in the user’s LD_LIBRARY_PATH environment variable.
2)....

关于mono - Kestrel 命令抛出无法加载 libuv。确保 libuv 已安装并可用作 libuv.so.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31976732/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com