System.DllNotFoundException: libgdiplus.dylib on OS X 10.10.4 #1272

Closed
desplesda opened this Issue Jul 10, 2015 · 9 comments

Projects

None yet

8 participants

@desplesda

Steps taken:

  1. Installed Brew
  2. $ brew tap homebrew/games
  3. $ brew install ckan
  4. $ ckan

Result:

exception inside UnhandledException handler: Object reference not set to an instance of an object

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeEngine ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeWin32Classic ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.KnownColors ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: libgdiplus.dylib
  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.KnownColors..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Drawing.Color.get_Black () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ThemeWin32Classic..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.ThemeVisualStyles..ctor () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ThemeEngine..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ContainerControl..ctor () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0 
  at CKAN.Main..ctor (System.String[] cmdlineArgs, CKAN.GUIUser User, Boolean showConsole) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) CKAN.Main:.ctor (string[],CKAN.GUIUser,bool)
  at CKAN.GUI.Main_ (System.String[] args, Boolean showConsole) [0x00000] in <filename unknown>:0 
  at CKAN.CmdLine.MainClass.Gui (CKAN.CmdLine.GuiOptions options, System.String[] args) [0x00000] in <filename unknown>:0 
  at CKAN.CmdLine.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 
@pjf
Member
pjf commented Jul 10, 2015

Hooray! A person who's best at writing and who wants to improve our brew installation¹!

According to the internet the solution is to install Xwindows. Can you check to see if that helps? If so, we'll add it to our FAQ

¹ I'm not quite sure who did the brew installation, but I'm totally glad they did!

@pjf pjf added support OSX labels Jul 10, 2015
@dholm
dholm commented Jul 11, 2015

@desplesda Install mono-mdk from homebrew cask, it includes libgdiplus.dylib.

  1. brew cask install mono-mdk
  2. open /opt/homebrew-cask/Caskroom/mono-mdk/4.0.0/MonoFramework-MDK-4.0.0.macos10.xamarin.x86.pkg
  3. env PATH=/Library/Frameworks/Mono.framework/Commands:$PATH ckan
@lars-tiede

@dholm's solution above (#1272 (comment)) worked for me.

@muratozkan

@dholm I skipped number 2 and it works for me too. I guess brew cask install mono-mdk command also installs the MDK package, so running it again would not be necessary.

@VladRassokhin
Contributor

So the solution is to add dependency into ckan cask?

@dholm
dholm commented Jul 19, 2015

@VladRassokhin Or figure out why the mono recipe doesn't build libgdiplus.dll.

@netkan-bot
Member

Hey there! I'm a fun-loving automated bot who's responsible for making sure old support tickets get closed out. As we haven't seen any activity on this ticket for a while, we're hoping the problem has been resolved and I'm closing out the ticket automaically. If I'm doing this in error, please add a comment to this ticket to let us know, and we'll re-open it!

@netkan-bot netkan-bot closed this Jul 26, 2015
@pjf pjf removed the support label Jul 26, 2015
@gadtfly
gadtfly commented Sep 8, 2015
brew cask install mono-mdk
Error: No available cask for mono-mdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment