我正在尝试使用Mono3.2.8使NuGet在CentOS 6.5的新安装下工作。但是,当我试图还原包时,我会得到一条WARNING: libMonoPosixHelper.so警告消息,然后是Unable to read package from path <package_Name>.nupkg和Unable to find version <some version> of package <next package>错误消息。这在使用相同Mono版本的Ubuntu14.04下工作得很好。
以下是输出:
[root@folke folke-app]# mono -V
Mono JIT compiler version 3.2.8 (tarball Wed Apr 23 20:44:34 CEST 2014)
Copyright (C) 2002-2014 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我克隆了这个.NET项目(我和其他人尝试过,结果是一样的):
[root@folke folke-app]# git clone https://github.com/acastaner/harnet.git
Initialized empty Git repository in /home/folke-app/harnet/.git/
remote: Reusing existing pack: 273, done.
remote: Total 273 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (273/273), 752.91 KiB | 429 KiB/s, done.
Resolving deltas: 100% (170/170), done.但是,当我试图恢复NuGet时,我得到了以下内容:
[root@folke folke-app]# mono nuget.exe restore harnet/harnet/packages.config -SolutionDirectory harnet/
WARNING: libMonoPosixHelper.so
Installing 'Newtonsoft.Json 5.0.8'.
Unable to read package from path 'Newtonsoft.Json.5.0.8.nupkg'.
Unable to find version '1.2.0' of package 'NodaTime'.我已经运行了mozroots --import --sync命令,它通常与Linux上的NuGet错误相关联。
更新:
我还执行了certmgr,没有运气:
certmgr -ssl -m https://go.microsoft.com
certmgr -ssl -m https://nugetgallery.blob.core.windows.net
certmgr -ssl -m https://nuget.org发布于 2014-06-15 15:28:27
nuget.exe无法工作,因为mono无法找到名为libMonoPosixHelper.so的库(我认为没有该库您可能无法运行mono/.NET应用程序)
首先,您应该在文件系统中搜索所需的库。
然后,您可以尝试这样的操作(从命令行接口):
export LD_LIBRARY_PATH=/path/to/directory/where/missing/library/was/found/
mono nuget.exe whatever_you_want_to_do有更多关于LD_LIBRARY_PATH用于以下链接的信息:文德
发布于 2014-11-06 15:24:54
如果从源代码编译Mono,那么libMonoPosixHelper.so很可能是在/usr/local/lib中编译的。
要确保从该目录加载库,请运行(作为root):
echo /usr/local/lib > /etc/ld.so.conf.d/local.conf
ldconfig在设置Mono环境上阅读此页面也可能值得一读,以了解Mono使用哪些环境变量来查找库。
https://stackoverflow.com/questions/23253862
复制相似问题