[Mono-list] System.DllNotFoundException: gdiplus.dll - libgdiplus.so is Missing on CentOS 5.1 / WHM (cPanel)

Amc Gmail amc1999 at gmail.com
Tue Jul 15 12:22:54 EDT 2008

>>   > root at host [/usr/local/lib]# find / -name libgdiplus*
>>   > /var/cache/yum/dag/packages/libgdiplus-1.0.5-1.2.el4.rf.i386.rpm
>>   > /var/cache/yum/dag/headers/libgdiplus-1.0.5-1.2.el4.rf.i386.hdr
>>   > /usr/lib/libgdiplus.so.0.0.0
>>   > /usr/lib/libgdiplus.so.0
>>   > /usr/share/doc/libgdiplus-1.0.5
>>   >
>>   > However when i run:
>>   >
>>   > root at host [/usr/local/lib]# ldconfig -p |grep libgdiplus
>>   >         libgdiplus.so.0 (libc6) => /usr/lib/libgdiplus.so.0
>>   >
>>   > I can see the lib is linked, but i still get same
>>   > 'System.DllNotFoundException: gdiplus.dll' exception.
>>   >
>>   > Any pointers much appreciated.
>>   Try looking at http://mono-project.com/DllNotFoundException and
>>   especially http://mono-project.com/Config_DllMap

i had similar problem and it cause by Mono 1.9 installation issue (bug???).
libgdiplus itself installed perfectly OK, but there is no dll-mapping
defined in Mono.

there are few ways to fix it (assuming Mono 1.9 installed in /mono/1.9/):

1. quick and NOT recommended in production.
    export LD_LIBRARY_PATH=/momo/1.9/lib:$LD_LIBRARY_PATH
into /mono/bin/mod-mono-server script (or mod-mono-server2)
and restart mod-mono through http://localhost/mono (or restart Apache)

2. define gdiplus.dll mapping for System.Drawing.dll
create System.Drawing.dll.config file:
    <dllmap dll="gdiplus.dll" target="/mono/1.9/lib/libgdiplus.so"/>
and copy it into /mono/1.9/lib/mono/gac/System.Drawing/***all-sub-dirs-here***/

i would expect that from Mono build/installer (why it does not?)

3. same as above, but in a simple way (i am using it myself)
add following line
  <dllmap dll="gdiplus.dll" target="/mono/1.9/lib/libgdiplus.so"/>
into /mono/1.9/etc/mono/config

hope it helps
-- amc

version of libgdiplus MUST be same as Mono version.
usually it is located in /your/mono/root/lib/

More information about the Mono-list mailing list