Categories
Applications Command Line (CLI)

cygwin error loading shared libraries

If you’ve been using Cygwin for a while, particularly imageMagick functions such as convert, you may notice some breakages on updating your cygwin version.  Errors such as:

convert: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

– it’s (Cygwin) telling you that there are some libraries missing.  You’ll need to find out which ones and then run the setup/installer to fix it.

To Fix it, first use the cygwin utility ‘cygcheck’ to reveal the names of the missing DLLs.   Since this post references the convert function of imageMagick,  run the command:

cygcheck convert

to generate a list of the missing libraries/DLLs.  For more information, you can check cygwin’s documentation site.  If you’re having trouble with “montage” : then in cygwin run:

cygcheck montage

and it should list out for you the libraries that it cannot find, one such library had the word “gomp” in it.  In the cygwin setup/installer, you’ll find the library just by putting in the last few letters (gomp) should find a match for you (or at least close enough) and click the checkbox to install the library.  Another missing library was TIFF- related.

In my case, it was missing the exact same libraries as cygcheck convert.  Once the install was complete, then the ‘convert’ function was back and running as expected.

HOO-RAY!!!

3 replies on “cygwin error loading shared libraries”

Helpful, but left out details. My particular issue was curl was failing with the same error. I’ve used ldd in the past, but it didn’t give me any indication of a missing dll. Your suggestion to do “cygcheck curl” helped.

cygcheck: track_down: could not find cygsasl2-2.dll

But I had to search the web to find out more information.

To find the missing package you can go to the cygwin page and click on Search Packages (or use http://cygwin.com/cgi-bin2/package-grep.cgi?grep=cygsasl where “cygsasl” was a string from my missing dll name.)

After installing libsasl… curl works!!

Thanks for the help!

I, too, had the Curl issue but resolved it with an easy search. The information posted here was invaluable!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.