1

I'm attempting to upgrade Graphicsmagick on Ubuntu 12.04 from 1.3.12 to 1.3.18 or newer. I tried to install it following these instructions, but Graphicsmagick did not upgrade and remained 1.3.12. I resorted to manually downloading the .deb and installing it using dpkg, but came across this behaviour, where dpkg would install the older version of the package.

$ gm
GraphicsMagick 1.3.12 2010-03-08 Q8 http://www.GraphicsMagick.org/
[...]
$ sudo apt-get remove graphicsmagick
[...]
$ gm
-bash: /usr/bin/gm: No such file or directory
$ wget http://mirrors.kernel.org/ubuntu/pool/universe/g/graphicsmagick/graphicsmagick_1.3.18-1ubuntu3_amd64.deb
$ sudo dpkg -i graphicsmagick_1.3.18-1ubuntu3_amd64.deb 
Selecting previously unselected package graphicsmagick.
(Reading database ... 493625 files and directories currently installed.)
Unpacking graphicsmagick (from graphicsmagick_1.3.18-1ubuntu3_amd64.deb) ...
Setting up graphicsmagick (1.3.18-1ubuntu3) ...
Processing triggers for man-db ...
$ gm
GraphicsMagick 1.3.12 2010-03-08 Q8 http://www.GraphicsMagick.org/

The package does indeed contain the advertised version of graphicsmagick, as installing it on another machine worked fine. Is there some explanation for why a newer version of the package can't be installed? Thanks.

  • Unfortunately, using neither sudo apt-get purge or dpkg purge solve the problem. – Richard Ye Sep 23 '14 at 18:51
  • 1
    This is happening because your libgraphicsmagick3 version is 1.3.12. Unfortunately you can't install 1.3.18 version of libgraphicsmagick3 on 12.04 as it is available for 14.04 only. – g_p Sep 23 '14 at 19:19
  • Hmm. Is there no way then to get graphicsmagick 1.3.18 on Ubuntu 14.04 without doing something like compiling from source? – Richard Ye Sep 23 '14 at 19:27
  • Can't say. Wait for some really good answer. – g_p Sep 23 '14 at 19:33
  • @RichardYe What is the output of apt-cache policy libc6? – Salem Sep 23 '14 at 21:15
2

Here's how to build version 1.3.20 from source.

Go to the URL ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/GraphicsMagick-LATEST.tar.gz and download the file to your Downloads folder and when it asks for a username click cancel or just close the popup.

Then open a terminal and execute the following commands one-by-one:

sudo apt-get update
sudo apt-get install automake build-essential libtool linux-headers-generic
cd ~/Downloads    
tar zxvf GraphicsMagick-LATEST.tar.gz
cd GraphicsMagick-1.3.20
autoreconf -f -i
./configure
make
sudo make install

This will install version 1.3.20! If it does not work in the end, delete the extracted archive (GraphicsMagick-1.3.20 folder) and start over at command #3 on the list of commands above and when you run ./config, read the output and if there are missing dependencies, they should be listed somewhere in there.

Note: This may fail to run on a fresh installation of Ubuntu 12.04 because of outdated versions of automake and autoreconf. To resolve, change AC_PREREQ in configure.ac to 2.68 and change AUTOMAKE_OPTIONS = 1.12 to 1.11 in Makefile.am before running autoreconf. The package doesn't need the newer dependencies and compiles just fine.

| improve this answer | |
  • I added linux-headers-generic to the sudo apt-get install list also just in case. – mchid Sep 24 '14 at 4:15
  • Thanks for your answer. I was hoping to avoid having to build from source (it runs on itinerant servers which need to be set up each time, so building from source would take a while), but I suppose I could build it from source once and host the binary somewhere. – Richard Ye Sep 24 '14 at 18:08
  • 1
    This will fail to run on a fresh installation of Ubuntu 12.04 because of outdated versions of automake and autoreconf. To resolve, change AC_PREREQ in configure.ac to 2.68 and change AUTOMAKE_OPTIONS = 1.12 to 1.11 in Makefile.am. The package doesn't need the newer dependencies and compiles just fine. – Richard Ye Oct 6 '14 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.