Library not loaded: @rpath/lib​mwhgbuilti​ns.dylib

48 views (last 30 days)

When I tried to plot, I received the following error message:

Bundle#95 start failed:
dlopen(/Applications/MATLAB_R2019b.app/bin/maci64/builtins/matlab_graphics_hgbuiltins/mwhgbuiltins_builtinimpl.dylib,
10): Library not loaded: @rpath/libmwhgbuiltins.dylib
Referenced from:
/Applications/MATLAB_R2019b.app/bin/maci64/builtins/matlab_graphics_hgbuiltins/mwhgbuiltins_builtinimpl.dylib
Reason: no suitable image found. Did find:
/Applications/MATLAB_R2019b.app/bin/maci64/builtins/matlab_graphics_hgbuiltins/../../../../bin/maci64/libmwhgbuiltins.dylib:
truncated mach-o error: segment __LINKEDIT extends to 2065888 which is past end of file
2065830
/Applications/MATLAB_R2019b.app/Contents/MacOS/../../bin/maci64/libmwhgbuiltins.dylib:
truncated mach-o error: segment __LINKEDIT extends to 2065888 which is past end of file
2065830

I’m using R2019b on my MacBook Pro (Retina, 13-inch, Early 2015) running macOS 10.15.2.

Please help me with this problem, thanks!

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 2 Mar 2020
It appears from the error that you included that MATLAB cannot find the "libmwhgbuiltins.dylib" possibly because Apple's System Integrity Protection software is preventing MATLAB from accessing the library file.
Below is a link to a workaround where you copy the library from the "matlabroot" location to the "/usr/lib/" folder.
The location of the library to be copied is:
>> fullfile(matlabroot, 'bin/maci64/libmwblas.dylib')
and it should be copied to
/usr/lib/
If you do not have access to that folder, you can place the library in a folder on the MATLAB path that you are working with, such as near the M file you are writing.
  6 Comments
Aaron Geldert
Aaron Geldert on 29 Jun 2022
Edited: Aaron Geldert on 29 Jun 2022
@Lina Maria Mancipe Castro You can right-click on that MATLAB app icon and use "Show Package Contents" to get into the app contents, like the bin directory.

Sign in to comment.

More Answers (0)

Categories

Find more on Search Path in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!