Library not loaded: @rpath/lib​cudart.10.​2.dylib

조회 수: 68(최근 30일)
I've recently been getting the following error when trying to run "bwlabel.m". Trying to run code that had been working as recently as a month ago. Any advice would be appreciated.
Running Matlab 2020b on Mac OS 10.15.7.
Unable to load bundle binary
/Applications/ Error:
dlopen(/Applications/, 10):
Library not loaded: @rpath/libcudart.10.2.dylib
Referenced from: /Applications/
Reason: no suitable image found. Did find:
/Applications/ code signature invalid for
  댓글 수: 11
雨鑫 史
雨鑫 史 2022년 7월 5일
I have the same problemi

댓글을 달려면 로그인하십시오.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2022년 6월 22일
This error is documented here:
Please refer to the Bug Report for details concerning this issue and its resolution. You may also "Follow" the Bug Report to be notified of future updates regarding this issue.
  댓글 수: 3
Yuval Vardi
Yuval Vardi 2022년 6월 22일
The instructions in the Bug Report only ask to update to Matlab 2021a. What should we do if we cannot update the matlab version?

댓글을 달려면 로그인하십시오.

추가 답변(5개)

guitalele 2022년 6월 13일
편집: guitalele 2022년 6월 22일
For other mac users who don't want to update MATLAB and don't have access to /usr/lib: I found that copying the library to /usr/local/lib did the trick, provided I also added an 'ad-hoc' code signature, eg:
sudo cp /Applications/ /usr/local/lib
sudo codesign --deep -fs - /usr/local/lib/libcudart.10.2.dylib
Tested on:
  • R2020b on Big Sur (11.6.6)
  • R2019b on Mojave (10.14.6) - note libcudart version is different: libcudart.10.1.dylib
Note that this solution is just based on previous answers ( + ) + google + trial and error. I have no expertise in macOS code signing and would welcome thoughts from Mathworks or others on whether this is a sensible thing to do.
Update 22nd June: As pointed out by @Tyler Cumby in the discussion below, there is no need to move the file to /usr/local/lib - you can just run the codesign command directly on the relevant file
  댓글 수: 14
Fatemeh Taheri
Fatemeh Taheri 2022년 7월 12일
It's work for me on macOS Big Sur 11.6. Thank you!

댓글을 달려면 로그인하십시오.

Bhavana Ravirala
Bhavana Ravirala 2022년 6월 9일
Hi Nitin,
Go through the following link which helps in eliminating the error.
Hope this helps.
  댓글 수: 1
Pierre Lanari
Pierre Lanari 2022년 6월 9일
Thanks for the suggestion.
As I don't have access to /usr/lib/ on Catalina, I have tried moving the library to my working directory (and various other locations in the MATLAB path).
I can find the library with the command:
which libcudart.10.2.dylib
However, this does not eliminate the error for me.

댓글을 달려면 로그인하십시오.

Naveh Levanon
Naveh Levanon 2022년 6월 9일
I had this problem now too in R2020b.
I installed R2021a fresh and the problem is gone. Others say re-installing R2021b works too. Possibly any re-install would fix this.
  댓글 수: 4
Joss Knight
Joss Knight 2022년 6월 13일
Hi Pierre. MATLAB does not ship the offending library (libcudart) in R2021a so I'd be interested for you to elaborate more to help us work out what's going wrong for you. Perhaps you are running a MEX function?

댓글을 달려면 로그인하십시오.

Abbas Ezzat
Abbas Ezzat 2022년 6월 11일
How can i run polymeric composite formulations to optimize selction criteria
  댓글 수: 1
Walter Roberson
Walter Roberson 2022년 6월 11일
I do not understand the relationship to the libcudart question?

댓글을 달려면 로그인하십시오.

Joss Knight
Joss Knight 2022년 7월 4일
This problem should now be fixed at Apple, please reboot and report here if you are still experiencing issues.




Community Treasure Hunt

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

Start Hunting!

Translated by