无论我做什么,单声道都不会发现

时间:2013-12-04 20:54:26

标签: c# .net linux mono

我希望你能帮助我。我在我的ubuntu系统上安装了mono,但是当我尝试启动一个应用程序时,我得到一个dllnotfound-exception。丢失的Dll是libgdiplus。我尝试将/ usr / lib /添加到共享库中,并尝试将Dll添加到mono配置文件中。两者都不起作用,但我的系统可以找到.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 

提前致谢。

1 个答案:

答案 0 :(得分:0)

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