mono & libgdi plus

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
stvnx7
Posts: 9
Joined: 24. Aug 2014, 19:35

mono & libgdi plus

Post by stvnx7 »

Hello everyone,

Sorry to have to ask so many questions on this forum. I need to install mono and libgdiplus in order to get Keepass to work.

I couldn't find mono or libgdiplus through slapt-get so I installed sbopkg using these instructions:

http://docs.salixos.org/wiki/How_to_use ... with_Salix

I'm familiar with sbopkg and when I was on slackware libgdiplus and mono both installed fine through sbopkg; but now I can't get them to install.

Am I missing something?

Here is the error when I try to run keepass

/usr/bin/keepass: line 2: /usr/bin/mono: No such file or directory

Also, find and locate for mono and libgdiplus don't show the inside any /usr/lib type of directory:

/var/lib/sbopkg/SBo/14.1/libraries/libgdiplus
/var/lib/sbopkg/SBo/14.1/libraries/libgdiplus/slack-desc
/var/lib/sbopkg/SBo/14.1/libraries/libgdiplus/README
/var/lib/sbopkg/SBo/14.1/libraries/libgdiplus/libgdiplus.info
/var/lib/sbopkg/SBo/14.1/libraries/libgdiplus/libgdiplus.SlackBuild
/var/lib/sbopkg/SBo/14.1/libraries/libgdiplus/libgdiplus-2.10.9.tar.bz2
/var/lib/sbopkg/SBo/14.1/libraries/libgdiplus.tar.gz
/var/lib/sbopkg/SBo/14.1/libraries/libgdiplus.tar.gz.asc
/var/lib/sbopkg/queues/libgdiplus.sqf
/var/cache/sbopkg/libgdiplus-2.10.9.tar.bz2


Thanks for any help!
User avatar
ibka
Posts: 159
Joined: 12. Sep 2010, 13:14
Location: Sweden
Contact:

Re: mono & libgdi plus

Post by ibka »

Try this instead

Code: Select all

sudo spi -i KeePass
This will install mono, libgdiplus and keepassx or use Sourcery and search for keepass
There is two versions keepassx and KeePass

EDIT
After installing KeePass it wont start, i get this error:

Code: Select all

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/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 KeePass.Program.Main (System.String[] args) [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/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 KeePass.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
Image
stvnx7
Posts: 9
Joined: 24. Aug 2014, 19:35

Re: mono & libgdi plus

Post by stvnx7 »

@ibka,

Thank you - I will try that.

I removed KeePass through "sudo slapt-get --remove KeePass"

and I have just ran "sudo spi -i KeePass".

Will let you know the results - it is building mono right now.
User avatar
laprjns
Salix Warrior
Posts: 1112
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: mono & libgdi plus

Post by laprjns »

ibka wrote:After installing KeePass it wont start, i get this error:

Code: Select all

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/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 KeePass.Program.Main (System.String[] args) [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/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 KeePass.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
Assuming that your running this on a 64 bit system, then the solution to this can be found in Post 21 of this link
http://www.linuxquestions.org/questions ... page2.html

Just edit your /etc/mono/config file and remove the preceding /use/lib/ in the following two lines of the file:

Code: Select all

dllmap dll="gdiplus" target="/usr/lib/libgdiplus.so" />
dllmap dll="gdiplus.dll" target="/usr/lib/libgdiplus.so" />
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
User avatar
ibka
Posts: 159
Joined: 12. Sep 2010, 13:14
Location: Sweden
Contact:

Re: mono & libgdi plus

Post by ibka »

laprjns wrote:
ibka wrote:After installing KeePass it wont start, i get this error:

Code: Select all

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/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 KeePass.Program.Main (System.String[] args) [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/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 KeePass.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
Assuming that your running this on a 64 bit system, then the solution to this can be found in Post 21 of this link
http://www.linuxquestions.org/questions ... page2.html

Just edit your /etc/mono/config file and remove the preceding /use/lib/ in the following two lines of the file:

Code: Select all

dllmap dll="gdiplus" target="/usr/lib/libgdiplus.so" />
dllmap dll="gdiplus.dll" target="/usr/lib/libgdiplus.so" />
That fixed the problem.
But i wont use KeePass, it don't look good

I have used keepassx for many years.
Image
stvnx7
Posts: 9
Joined: 24. Aug 2014, 19:35

Re: mono & libgdi plus

Post by stvnx7 »

Thanks guys - using spi did the trick (I wonder why sbopkg didn't work?)

I also had to use the solution posted in the linuxquestions.org linked above.
Post Reply