gpt4 book ai didi

c# - 无论我做什么,Mono dllnotfound

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:35:13 27 4
gpt4 key购买 nike

我希望你能帮助我。我在我的 ubuntu 系统上安装了单声道,但是当我尝试启动一个应用程序时,我得到一个 dllnotfound 异常。缺少的 Dll 是 libgdiplus。我尝试将/usr/lib/添加到共享库,并尝试将 Dll 添加到单声道配置文件。两者都不起作用,但我的系统可以找到 .so 文件,当我查找它时,甚至 ldconfig 也说它在那里:

sudo ldconfig -p |grep libgdiplus
libgdiplus.so.0 (libc6) => /usr/lib/libgdiplus.so.0
libgdiplus.so (libc6) => /usr/lib/libgdiplus.so

但是我在尝试启动单声道时得到的错误仍然是一样的。但是当我试图将这个库的路径添加到 LD_LIBRARY_PATH 环境变量时我感到非常好奇,因为当我尝试时,我发现这个变量不存在并且当我将它设置为/usr/lib mono 时并不关心并给我相同的错误信息

这是我尝试运行 Mono 时得到的控制台输出:

Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: /usr/local/lib/libgdiplus.so
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Drawing.Graphics.FromHdcInternal (IntPtr hdc) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Application.EnableVisualStyles () [0x00000] in <filename unknown>:0
at GUI.Program.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: /usr/local/lib/libgdiplus.so
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Drawing.Graphics.FromHdcInternal (IntPtr hdc) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Application.EnableVisualStyles () [0x00000] in <filename unknown>:0
at GUI.Program.Main () [0x00000] in <filename unknown>:0

提前致谢。

最佳答案

我的问题现在已经解决了。经过数小时的尝试让单声道识别 libgdiplus 的路径后,我刚刚重新安装了该库。现在这个异常不再发生(虽然另一个是...:( )

关于c# - 无论我做什么,Mono dllnotfound,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20385717/

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