The compiled ImageMagick on the Linux system do the migration

Source: Internet
Author: User
Tags imagemagick

How to move the compiled tools to another machine, sometimes we encounter such a problem, how to solve the library file dependency problem we need to follow the error prompt to solve the problem, I take imagemagick as an example to explain.


How to compile and install the ImageMagick environment, refer to my previous article ImageMagick installation and use cases, Links:


http://xiaoxiaozhou.blog.51cto.com/4681537/1903499


In this article, the two hosts are identified with Server1 and Server2 respectively, server1 for the installation of the system to compile a good imagemagick, Server2 is not compiled to install ImageMagick system.


First of all, the Server1 compiled files to Server2, the following is the Server2 on the Received files

~/sxzhou> LL

Total 40

Drwxr-xr-x 7 was_wcm was_wcm 4096 Mar 3 ImageMagick

Drwxr-xr-x 8 was_wcm was_wcm 4096 Mar 3 libpng-1.5.8


Execution Error:

~/sxzhou/imagemagick/bin>./convert

./convert:error while loading shared libraries:libmagickcore-7.q16hdri.so.2:cannot open shared object File:no such fil E or directory


It can be found that the library file is missing, the missing library files are copied to server2 on it.


Find missing library files on Server1

# Find-name Libmagickcore-7.q16hdri.so.2

./usr/local/imagemagick/lib/libmagickcore-7.q16hdri.so.2

./home/sxzhouhou/imagemagick-7.0.5-0/magickcore/.libs/libmagickcore-7.q16hdri.so.2


Can be found in addition to the installation directory under/usr/local/also have library files, copy/usr/local/imagemagick to server2/usr/local directory


Error executing again:

/home/was_wcm/sxzhou/imagemagick/bin #./convert

./convert:error while loading shared libraries:libpng15.so.15:cannot open Shared object File:no such file or director


Find on Server1

# Find/-name libpng15.so.15

/usr/local/lib/libpng15.so.15

/home/sxzhouhou/libpng-1.5.8/.libs/libpng15.so.15


Server1 PNG-related library files

/usr/local/lib # ls Libpng

libpng.a libpng.so libpng15.la libpng15.so.15 libpng.la libpng15.a libpng15.so libpng15.so.15.8.0  


Copy the PNG-related library files on Server1 to the/usr/local/lib/directory of Server2


Error executing again:

/home/was_wcm/sxzhou/imagemagick/bin #./convert

./convert:error while loading shared libraries:libpng15.so.15:cannot open Shared object file:no such file or directory


/home/was_wcm/sxzhou/imagemagick/bin # Ldconfig/usr/local/lib

Ldconfig:/usr/local/lib/libpng15.so.15 is not a symbolic link


The reason for the above error is that libpng15.so.15 is normally a symbolic link, so modify it as a symbolic link


View the files for the source host

/usr/local/lib # ll libpng15.so.15

lrwxrwxrwx 1 root root 2 14:21 libpng15.so.15-libpng15.so.15.8.0


And now the host file

/usr/local/lib # ll libpng15.so.15

-rwxr-xr-x 1 root root 610183 Mar 3 10:44 libpng15.so.15


Server2 do the following:

/usr/local/lib # mv Libpng15.so.15 libpng15.so.15.8.0

/usr/local/lib # ln-s libpng15.so.15.8.0 libpng15.so.15

/usr/local/lib # ll libpng15.so.15

lrwxrwxrwx 1 root root 3 10:59 libpng15.so.15-libpng15.so.15.8.0


Finally can be used!!!

/home/was_wcm/sxzhou/imagemagick/bin #./convert

Version:imagemagick 7.0.5-0 Q16 x86_64 2017-03-02 http://www.imagemagick.org

Copyright:? 1999-2017 ImageMagick Studio LLC

license:http://www.imagemagick.org/script/license.php

Features:cipher DPC HDRI OpenMP

Delegates (built-in): PNG zlib


This article is from the "Xiaoxiaozhou" blog, make sure to keep this source http://xiaoxiaozhou.blog.51cto.com/4681537/1903514

The compiled ImageMagick on the Linux system do the migration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.