Re: Imagemagick / convert slow on VPS - solved!

Anthony Thyssen <[email protected]>
Newsgroups gmane.comp.video.image-magick.user
Message-ID <20100512135115.64940c09@wraith>
On Tue, 11 May 2010 21:15:52 -0600
[email protected] wrote:

| I installed ImageMagick using the --disable-openmp option and this 
| solved the problem.  Curiously however, when I would check which version 
| of convert it came back with /usr/local/bin/convert as opposed to 
| /usr/bin/convert which was where the honorific hostgator s/a staff 
| installed it leading to the disaster.
| 
| % which convert
| /usr/local/bin/convert
| 
| I ran convert without forcing the path and it balked and took about 9 
| seconds.  Then when I ran it with the full path, it worked flawlessly:
| 
| /home/www% uptime ; date ; /usr/local/bin/convert oak_tree.jpg -resize 
| 480 -strip oak_tree480.jpg ; date ; uptime
|  21:50:56 up 13 days,  1:24,  2 users,  load average: 0.17, 0.52, 1.22
| Tue May 11 21:50:56 CDT 2010
| Tue May 11 21:50:56 CDT 2010
|  21:50:56 up 13 days,  1:24,  2 users,  load average: 0.17, 0.52, 1.22
| 
| I installed a second time using he --prefix option but it did not seem 
| to make any difference. 
| 
| ./configure --disable-openmp --prefix /usr/bin
| 
| I thought this would overwrite the /usr/bin/convert but it did not.  Do 
| you have to do a dash or perhaps double-quote /usr/bin in order for it 
| to be recognized?
| 
| To get past this in the meantime I rename /usr/bin/convert and created a 
| hard link from /usr/local/bin/convert.  Probably should do the same with 
| identify if this is the only way.
| 
| -Bob
| 
--prefix should be in the 'containing directory' for all bins and
libraries.

That is   --prefix=/usr
is what you should have used.

you will find you now have a four sub-directories in /usr/bin
that will need to be cleaned up... eg
   /usr/bin/bin
   /usr/bin/lib
   /usr/bin/include
   /usr/bin/share

I do not and never have recommended any software package be directly
installed when it is not part of a package management system.
Any direct installed packages is best installed in a /opt sub-directory
such as   --prefix=/opt/im     (put everything in /opt/im sub-dir)

This keeps it separate and easy to clean up, especially if you want to
test or try multiple different packages.



  Anthony Thyssen ( System Programmer )    <[email protected]>
 --------------------------------------------------------------------------
    Imagine if every Thursday your shoes exploded if you tied them the
    usual way.  This happens to us all the time with computers, and
    nobody thinks of complaining.                            -- Jef Raskin
 --------------------------------------------------------------------------
   Anthony's Castle     http://www.cit.griffith.edu.au/~anthony/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.