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

10 ビュー (過去 30 日間)
Nitin Tandon
Nitin Tandon 2022 年 6 月 6 日
コメント済み: Fatemeh Taheri 2022 年 7 月 12 日
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/MATLAB_R2020b.app/bin/maci64/builtins/images_builtins/mwlibmwimagescore_builtinimpl.dylib. Error:
dlopen(/Applications/MATLAB_R2020b.app/bin/maci64/builtins/images_builtins/mwlibmwimagescore_builtinimpl.dylib, 10):
Library not loaded: @rpath/libcudart.10.2.dylib
Referenced from: /Applications/MATLAB_R2020b.app/bin/maci64/libopencv_core.4.2.0.dylib
Reason: no suitable image found. Did find:
/Applications/MATLAB_R2020b.app/bin/maci64/libcudart.10.2.dylib: code signature invalid for
'/Applications/MATLAB_R2020b.app/bin/maci64/libcudart.10.2.dylib'
  11 件のコメント
Graham Fraser
Graham Fraser 2022 年 6 月 8 日
編集済み: Graham Fraser 2022 年 6 月 8 日
I was able to work around this problem on Mojave (10.14.4) by copying:
/Applications/MATLAB_R2020a.app/bin/maci64/libcudart.10.1.dylib
to:
/usr/lib
Delete and reinstall MATLAB, Reboot, and bwlabel should work again.
This workaround doesn't seem to work on Catalina and above because root cannot modify /usr/lib. Disabling SIP protection may get around this but so far I haven't been able to get my solution to work even with SIP disabled.
Hope this helps get us closer to a permanent solution.
雨鑫 史
雨鑫 史 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 件のコメント
MathWorks Support Team
MathWorks Support Team 2022 年 6 月 22 日
The workarounds described below are not validated by MathWorks and may result in unintended consequences with our products. As such, these are not recommended. If you are not able to follow the instructions in the Bug Report, please contact MathWorks Technical Support and share your workflow.
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
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/MATLAB_R2020b.app/bin/maci64/libcudart.10.2.dylib /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 (https://uk.mathworks.com/matlabcentral/answers/1735020-library-not-loaded-rpath-libcudart-10-2-dylib#answer_982300 + https://uk.mathworks.com/matlabcentral/answers/403742-invalid-mex-file-and-missing-libmwblas-dylib-error#comment_1506540 ) + 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 件のコメント
Jessica Zhao
Jessica Zhao 2022 年 6 月 28 日
Works for me on macOS Monterey 12.4 for MATLAB R2020a too! Thank you!
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 件のコメント
Pierre Lanari
Pierre Lanari 2022 年 6 月 10 日
A fresh installation of R2021a did not solve the problem for me.
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.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by