背景
scrcpy
是一个手机投屏工具,非常好用,但运气不佳也会遇到一些问题
问题描述
某日,运行scrcpy
进行手机投屏时,突然报错库找不到:
bash
➜ ~ scrcpy
dyld[98464]: Library not loaded: /opt/homebrew/opt/mbedtls/lib/libmbedcrypto.14.dylib
Referenced from: <8C2E2CF9-054E-300F-BDE7-3DE52F848638> /opt/homebrew/Cellar/librist/0.2.7_3/lib/librist.4.dylib
Reason: tried: '/opt/homebrew/opt/mbedtls/lib/libmbedcrypto.14.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/mbedtls/lib/libmbedcrypto.14.dylib' (no such file), '/opt/homebrew/opt/mbedtls/lib/libmbedcrypto.14.dylib' (no such file), '/usr/local/lib/libmbedcrypto.14.dylib' (no such file), '/usr/lib/libmbedcrypto.14.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/mbedtls/3.5.0/lib/libmbedcrypto.14.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/mbedtls/3.5.0/lib/libmbedcrypto.14.dylib' (no such file), '/opt/homebrew/Cellar/mbedtls/3.5.0/lib/libmbedcrypto.14.dylib' (no such file), '/usr/local/lib/libmbedcrypto.14.dylib' (no such file), '/usr/lib/libmbedcrypto.14.dylib' (no such file, not in dyld cache)
[1] 98464 abort scrcpy
解决方案
多番尝试,最后的解决方案,是升级并更新homebrew
,再重装scrcpy
:
bash
➜ ~ brew update && brew upgrade
➜ ~ brew uninstall scrcpy && brew install scrcpy
重装完成后,再运行scrcpy
就能正常投屏了。