Foreword
ImageMagick is a very useful tool for image format conversion, size reduction, cropping, etc. It can be installed on both Windows and Linux systems. Because our environment is Ubuntu, we encountered some problems during the installation process. Let's take a look at the process and method of the solution.
problem found
When trying to install ImageMagick using apt-get install
, there was a problem of missing dependencies:
The following packages have unmet dependencies
After using apt-get update
and apt-get upgrade
commands to update the index and upgrade all packages, it still cannot be installed. Use the apt-get install -f
command to repair the dependencies, but it still has no effect.
Resolution process
So I used aptitude to install, and found that there was no aptitude in the command line, and I had to install aptitude first through the apt-get install aptitude
command, but I encountered the problem of missing dependencies:
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
to install libstdc++6, but it cannot be installed successfully. Therefore, manually download the deb package of libstdc++6 and install it:
$ apt-get download libstdc++6
$ sudo dpkg -i libstdc++6_4.9.2-10ubuntu13_amd64.deb
Get the 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.
Solution
This is because the gcc version installed in my Ubuntu is 4.9.2-0ubuntu4, and libstdc++6 depends on the 4.9.2-10ubuntu13 version.
apt-get install gcc-4.9-base=4.9.2-10ubuntu13
.apt-get install
aptitude
to install ImageMagickFinally installed ImageMagick, and summarize the problems encountered in the installation process: the main problem is that the dependency library is missing. In this case, you can consider using aptitude install to install it. It will automatically install the required dependencies, in one step.
One of the special problems I encountered is that the aptitude in the system is missing. You need to use apt-get install
to install aptitude first, and the installation prompts that the dependency is missing libstdc++6, which seems to be stuck Endless loop. So use apt-get download
and dpkg -i to manually download the libstdc++6 package for installation. The installation process relies on a specific version of gcc-4.9-base, so use apt-get install to install it, and then Go back and install libstdc++6, and finally install aptitude, and you are done!
to sum up
The above is the entire content of this article. I hope that the content of this article will be helpful to your study or work. If you have any questions, you can leave a message and communicate. Thank you for your support to ZaLou.Cn.
Recommended Posts