PreBuilt Binary of ImageMagick

Place to discuss Fedora and/or Red Hat
Post Reply
User avatar
xyle_one
programmer
programmer
Posts: 127
Joined: Mon Jan 13, 2003 1:02 pm
Contact:

PreBuilt Binary of ImageMagick

Post by xyle_one » Thu Jun 30, 2005 3:10 pm

I have run into a small problem. I am hosting a site on a friends server, but my site requires imageMagicks convert for the portfolio section of the site. Well, the admin section anyways. I wanted clean images resized with convert, and not PHPs GD functions. I was never happy with the results from that. Anyways, it appears that ImageMagick was not installed. He is renting a machine from 1and1 and they use the Plesk control panel. I can't install anything on it and my friend isn't replying today for some reason. Google searching has led me to the idea of a pre built, ready to run binary that I can point my scripts to. I can't find any more information than that though.
I've found for totally instant gratification, that I can download a prebuilt binary of ImageMagick and just upload it to my webspace with the proper permissions and just point my script to that and it works fine. Or you can send in a ticket and they can do what they need to do
Reply With Quote

Is it possible to do this? Can I just drop a binary in the users root directory and use that? That would be a miracle 8)
The machine is running Fedora, though I don't know what version...

Code: Select all

rpm -ql ImageMagick | more
returns "package ImageMagick is not installed"
locate ImageMagick returned /usr/share/man/fr/man1/ImageMagick.1.gz and some cache files...


If I must, I will switch to PHPs built in image manipulation tools. Perhaps I am just using them wrong and can get the same quality that convert achieves.

Thanks in advance.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Thu Jun 30, 2005 5:51 pm

That would be very strange to have a man page and not have the application. That's an odd location for the man page though, mine is in /usr/share/man/man1. I guess that's the French version.

If it is not installed you are probably not going to be able to just upload the convert binary unless you also have all the shared libraries installed that convert was linked against. Here's all the libraries my copy of convert is linked to:

Code: Select all

$ ldd /usr/bin/convert
        linux-gate.so.1 =>  (0x0054b000)
        libMagick.so.6 => /usr/lib/libMagick.so.6 (0x00d5d000)
        libtiff.so.3 => /usr/lib/libtiff.so.3 (0x00111000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00ab1000)
        libgs.so.7 => /usr/lib/libgs.so.7 (0x00f78000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x00a21000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x0045d000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x005de000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x001f5000)
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x00166000)
        libbz2.so.1 => /usr/lib/libbz2.so.1 (0x00a4a000)
        libm.so.6 => /lib/libm.so.6 (0x001bb000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x001df000)
        libltdl.so.3 => /usr/lib/libltdl.so.3 (0x002c9000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00770000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00b48000)
        libdl.so.2 => /lib/libdl.so.2 (0x001f1000)
        libc.so.6 => /lib/libc.so.6 (0x002d0000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x005f8000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x003fa000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00404000)
        libcupsimage.so.2 => /usr/lib/libcupsimage.so.2 (0x00c46000)
        libcups.so.2 => /usr/lib/libcups.so.2 (0x00860000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00428000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x0048c000)
        /lib/ld-linux.so.2 (0x00470000)
        libssl.so.5 => /lib/libssl.so.5 (0x0054c000)
        libcrypto.so.5 => /lib/libcrypto.so.5 (0x0087f000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x007d8000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x006de000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0x0042c000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00b18000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x0042f000)
        libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00442000)
If the convert binary cannot find all those libraries with those exact names it will not work. They don't actually have to reside in the directories shown above so you could upload the libraries to a directory under your home as well and add that directory to your LD_LIBRARY_PATH variable.

However, an easier way is to compile ImageMagick on another machine but compile it static rather than dynamic. When you statically link it it will suck those libraries right into the convert binary so there are no dependencies. The convert program will be significantly larger but you could then upload it and run it without all those other libraries. Maybe you can find one out on the net that is already compiled and statically linked.

User avatar
xyle_one
programmer
programmer
Posts: 127
Joined: Mon Jan 13, 2003 1:02 pm
Contact:

Post by xyle_one » Thu Jun 30, 2005 6:45 pm

Thanks Void Main. I'll look into that.

Post Reply