Ubuntu system installation ImageMagick error resolution process

  • 2020-06-12 11:35:47
  • OfStack

preface

ImageMagick is a very useful tool for image format conversion, size reduction, cropping and other operations, can be installed in Windows and Linux systems, because our environment is Ubuntu environment, in the installation process encountered some problems, the following is a look at the process and methods to solve it.

Found the problem

Trying to use apt-get install When installing ImageMagick, the problem of missing dependencies occurred:


The following packages have unmet dependencies 

use apt-get update , apt-get upgrade Unable to install after the command updates the index and updates all packages. And use apt-get install -f The command to fix the dependency still has no effect.

To solve the process

You use aptitude to install and find that aptitude is not on the command line and can only pass apt-get install aptitude The command installs aptitude, only to encounter the dependency loss problem again:


The following packages have unmet dependencies 
 Depends: libstdc++6 (>= 4.9) but 4.8.4-2ubuntu1~14.04 is to be installed

Try to use apt-get install Unable to install libstdc++6 successfully. Therefore, manually download libstdc++6 deb package for installation:


$ apt-get download libstdc++6
$ sudo dpkg -i libstdc++6_4.9.2-10ubuntu13_amd64.deb

Error message:


dpkg: dependency problems prevent configuration of libstdc++6:amd64: 
 libstdc++6:amd64 depends on gcc-4.9-base (= 4.9.2-10ubuntu13); however:
 Version of gcc-4.9-base:amd64 on system is 4.9.3-0ubuntu4.

The solution

This is because my Ubuntu version of gcc is 4.9.2-0ubuntu4 and libstdc++6 relies on version 4.9.2-10ubuntu13.

So, by apt-get install gcc-4.9-base=4.9.2-10ubuntu13 Install the gcc-4.9-ES50en version on which you rely. Then, execute the command above to install libstdc++6 After use apt-get install To install aptitude Finally, use aptitude To install ImageMagick

Finally installed ImageMagick, sum up the problems encountered in the installation process: the main problem is the lack of dependency library, in this case, you can consider using aptitude install to install, it will automatically install the required dependencies, 1 step in place.

One of the more specific problems I encountered was that aptitude was missing from the system and needed to be used apt-get install To install aptitude, install the dependency missing libstdc++6, seems to be stuck in an endless loop. So using apt-get update0 And ES68en-ES69en manually download libstdc++6 package for installation, and the installation process depends on the specific version of ES71en-4.9-ES72en, so use ES73en-ES74en install to install it, then go back to install libstdc++6, finally install aptitude, done!

conclusion


Related articles: