18

I had some issues with ImageMagick and I was told Ubuntu's default ImageMagick package is an ancient version and I should upgrade to resolve my issues.

How can I do that? I have the latest Ubuntu version (12.10). Synaptic shows me 8:6.7.7.10-2ubuntu4 as the latest version of IM. It means my IM version is 6.7.7.10 (convert --version outputs the same). IM does not provide deb binaries itself. Debian has something newer, but in some testing/experimental branches if I understand it well. I found IM on Launchpad, but there are no instructions how to add this to my sources, it seems it is not one of the usual PPAs I meet when searching for the latest/beta software. I don't know how to work with this one.

Is there a way how to mark a package to be taken from some bleeding edge sources and leave the rest of my system to be taken from standard sources? It would be probably the best to upgrade to the last stable version of IM (6.8), but that is probably sci-fi as it is not even in Debian. However, I need at least 6.7.9.


Note: I want to avoid compilation from source. I hate having installed something and not being able to manipulate with it easily with apt-get or Synaptic. Moreover, there are no updates for compiled programs. Always I compile I feel like going against the system, like using glue, wires and duck tape. No, I do not want to compile it for sure.

9
  • The easiest way to get new versions is to actually help out with packaging the new version and uploading it for the maintainers. Suggest join the launchpad.net/imagemagick team or preferably work upstream.
    – fossfreedom
    Mar 14, 2013 at 13:03
  • That would be nice, but I am Python developer with absolutely no deeper knowledge of Ubuntu/Debian packaging, so it is task rather for people who are closer to DevOps/packaging/UNIX managment. I will help the world by writing open source Python libraries :) Mar 14, 2013 at 13:06
  • There isnt really an answer as far as I can see other than by compiling & packaging hence the suggestion.
    – fossfreedom
    Mar 14, 2013 at 13:07
  • I know you said you don't want to compile, but this may be of interest: You can keep your existing imagemagick package and its dependencies with this method. You can run configure with --prefix=/opt, compile the program, and then install to /opt with checkinstall, so you can manage the compiled version as a package via apt-get. If you want to use the new version, you have to specify /opt/bin/convert when say you run convert, unless you create some symlinks. Either way, you can keep both the standard package version and your compiled version
    – user76204
    Mar 14, 2013 at 21:18
  • 1
    Well, I did not know about checkinstall. If I understand it right, it should install compiled version of program into my system and then represent it as a package in Synaptic or so, which means I can safely and easily remove it later. That would be great! Mar 15, 2013 at 10:02

2 Answers 2

20

Please Note: Even though Honza initially said that he did not want to compile, we discussed using checkinstall to install the compiled package in the comments above. That was just what Honza wanted, as programs installed with checkinstall can be removed like any other package with the package manager.


As we are installing to /opt using checkinstall after the build, we can leave the original imagemagick package in place. (Infact, install the repository version if it is not already installed.) The dependencies can be left installed, and they are no different for the most recent version of imagemagick. What we need to do is install the build dependencies and some other tools first of all:

sudo apt-get install build-essential checkinstall && sudo apt-get build-dep imagemagick

Download the source code from the official site and, using terminal, cd to where the source package is and extract it:

tar -xzvf ImageMagick-6.8.3-9.tar.gz

Now move to that folder with

cd Imagemagick-6.8.3-9

Now, if you want to find out the available options for the build, run

./configure --help

However, mostly everything is already set to enabled, so there is little need to specify anything further, apart from the necessary --prefix. You could use other locations, but we shall use /opt here. Now run configure and make:

./configure --prefix=/opt/imagemagick-6.8 && make

Now, the last thing to do is to use checkinstall to install the package. Make sure you are in the Imagemagick-6.8.3-9 folder and run

sudo checkinstall

You can of course run checkinstall with parameters such as --pkgversion= or choose them after you have run sudo checkinstall, but all the defaults are fine here. The package name that will be created will be called imagemagick-6.8.3-9 and it will be installed in /opt/imagemagick-6.8.

You will now be also able to see the package in Synaptic and manage it just like any other packages, and removing it will not cause problems with other packages.

If you want to run your new versions, you will need to use /opt/imagemagick-6.8/convert, for example, as /opt is not in $PATH, and just running convert will call the repo version. You could create some symlinks if you wanted to always run the /opt version of the programs.

Please note that this is what Honza wanted, even though he initially was averse to compiling, until checkinstall was discussed.

6
  • Thank you! Actually, my question was originally just "How can I install current the latest upstream version of ImageMagick", the "without compiling" part was added by fossfreedom moderator, probably after reading my note at the end of my question. Mar 15, 2013 at 12:34
  • 1
    Proper path to convert is /opt/imagemagick-6.x/bin/convert. At least it is that way for 6.9.1 version which I installed now. Your path is missing /bin/.
    – Rafal
    Jun 25, 2015 at 12:30
  • I got the following error when trying to install the build dependencies: Unable to find a source package for imagemagick. I was able to install dependencies this way: sudo apt-get install imagemagick libmagick++-dev as detailed here.
    – bwroga
    Feb 23, 2016 at 20:04
  • Another reason you might see Unable to find a source package for imagemagick is you need to uncomment deb-src sources in /etc/apt/source.list so that package is found.
    – Michael
    Jul 5, 2018 at 20:57
  • Note, I had to do ldconfig after checkinstall to get the bindings updated. Jan 2, 2019 at 18:02
1

Nowadays you can get an AppImage for ImageMagick (here). You only need to mark the file as executable, with chmod +x magick, for instance, and then put the file in some folder belonging to your PATH (issue the comand echo $PATH valid folders). I usually put these files under $HOME/.local/bin.

Of course, these operations can also be done via graphical utilities such as Nautilus, if you do not want to use the terminal.

With this approach, you're effectively "installing without compiling". Please note that you must have FUSE and libc (which is already the case in many Linux distributions).

Assuming you have wget, you can use these commands:

cd ~
wget https://download.imagemagick.org/ImageMagick/download/binaries/magick
chmod +x magick
mkdir -p ~/.local/bin
mv magick ~/.local/bin 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .