Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dyld: Library not loaded, Reason: image not found

I used gdb normally until this week. Now running gdb I see:

(gdb) r Starting program: /Volumes/MyProg  dyld: Library not loaded: @rpath/libCore.so   Referenced from: /Volumes/MyProg   Reason: image not found (gdb)  

How to fix it?

I have:

  • OSX 10.9
  • GNU gdb (GDB) 7.6 installed with MacPorts

P.S.

I have reinstalled gdb and Xcode. This does not help.

I see a lot of questions about dyld issues, but obviously I lack experience with libraries on OSX, and they appears to be useless for me.

For example this topic: dyld issues library not loaded But how to download library again?

Or this topic: Dyld: Library not loaded But how to find out install name? What is @rpath?

like image 463
klm123 Avatar asked Dec 08 '13 16:12

klm123


People also ask

Is “dyld library not loaded” error on macOS?

MacOS developed and distributed by Apple is surely one of the most reliable Operating System out there. It is used mostly by professionals who intend to use their computers for business purposes. However, quite recently a lot of reports have been coming in of a “Dyld: Library Not Loaded” Error on MacOS.

Why is my library not showing up in my build?

If still not works.. This happens because you have different, unmatched versions of libraries present. Important: Check all libraries are included in the Build Settings -> libraries and frameworks list and you have given option to embbed in the build Show activity on this post.

What happened to dylib_install_name_base in Xcode?

For some reason, well into the development of a Swift 2.3 custom Framework, Xcode 8 had removed the DYLIB_INSTALL_NAME_BASE setting from the project.pbxproj file. A little walk into the Build Settings / "Dynamic Library Install Name Base" setting back to "@rpath" fixed it.

How to add dylibs to the embedded binaries in Swift?

Now you will be able to see some swift dylibs, Select all the swift libraries with .dylib extension and click on open. These will get added to the embedded binaries in the general tab of app.


1 Answers

I solved this issue with "Embedded Binaries" in the General project settings.

like image 158
Karsten Avatar answered Sep 22 '22 14:09

Karsten