Error installing "imagemagick"

Hey there. I’ve got a node.js static site generator that depends on imagemagick.

Here’s what my circle.yml includes:

dependencies:
    pre:
        - sudo apt-get update && sudo apt-get install imagemagick

At the “Dependencies” step, it fetches all the new package lists, then errors out with:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 imagemagick : Depends: libmagickcore5 (>= 8:6.7.7.10) but it is not going to be installed
               Depends: libmagickwand5 (>= 8:6.7.7.10) but it is not going to be installed
               Recommends: libmagickcore5-extra but it is not going to be installed

sudo apt-get update && sudo apt-get install imagemagick returned exit code 100

E: Unable to correct problems, you have held broken packages. Action failed: sudo apt-get update && sudo apt-get install imagemagick

Installing another package (e.g. gnu-smalltalk) works just fine.

Installing the unmet dependencies as well (libmagickcore5 and libmagickwand5) fixes this error, but is replaced by the same error, this with the unmet dependencies of libmagickcore5 and libmagickwand5. Attempting to install those dependencies shows more unmet dependencies, and so on and so forth.

SSH-ing into the machine to manually install the dependencies results in the same error.

Running the same commands on a non-CircleCI Ubuntu VM results in no error.

Sample build URL: https://circleci.com/gh/hofftech/hofftech.github.io/62#config

Any help at all would be appreciated. Thanks!

1 Like

Got it to work with:

dependencies:
  pre:
    - sudo apt-get --reinstall install libept1.4.12
    - sudo apt-get install -y aptitude
    - sudo aptitude -y install imagemagick
    - sudo aptitude -y install libmagickcore-dev
    - sudo aptitude -y install libmagickwand-dev
1 Like

Installation of those libraries take quite some time. Caching ? I’ve seen several answers but can’t figure out a way to put them together…