Solution to error while loading shared libraries when installing ImageMagick

  • 2021-07-21 07:53:17
  • OfStack

This article illustrates the solution of error while loading shared libraries when installing ImageMagick. Share it for your reference. Specific solutions are as follows:

When running the program, if you encounter an error like the following:


./tests: error while loading shared libraries: xxx.so.0:cannot open shared object file: No such file or directory

That means the system doesn't know which directory xxx. so is in.

At this point, add the directory where xxx. so is located in the/etc/ld. so. conf.

1 In general, there are many so files in the/usr/local/lib directory, so adding the/usr/local/lib line in the/etc/ld. so. conf can solve this problem.

After you archive the/etc/ld. so. conf, you must execute "/sbin/ldconfig v" to update 1 before it will take effect.

I hope this article will be helpful to everyone.


Related articles: