使用 MacPorts 安装 iTerm2,如软件包文档中所述。
尝试启动应用程序时失败并出现以下错误
% /Applications/MacPorts/iTerm2.app/Contents/MacOS/iTerm2
dyld[23279]: Library not loaded: @rpath/BetterFontPicker.framework/Versions/A/BetterFontPicker
Referenced from: <E578C903-50EB-3B2F-BEC3-FE121AE39446> /Applications/MacPorts/iTerm2.app/Contents/MacOS/iTerm2
Reason: tried: '/Applications/MacPorts/iTerm2.app/Contents/MacOS/../Frameworks/BetterFontPicker.framework/Versions/A/BetterFontPicker' (code signature in <ED4B4372-9E02-37AE-ADED-0A904093467D> '/Applications/MacPorts/iTerm2.app/Contents/Frameworks/BetterFontPicker.framework/Versions/A/BetterFontPicker' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/Applications/MacPorts/iTerm2.app/Contents/Frameworks/BetterFontPicker.framework/Versions/A/BetterFontPicker' (code signature in <ED4B4372-9E02-37AE-ADED-0A904093467D> '/Applications/MacPorts/iTerm2.app/Contents/Frameworks/BetterFontPicker.framework/Versions/A/BetterFontPicker' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/Applications/MacPorts/iTerm2.app/Contents/MacOS/../Frameworks/BetterFontPicker.framework/Versions/A/BetterFontPicker' (code signature in <ED4B4372-9E02-37AE-ADED-0A904093467D> '/Applications/MacPorts/iTerm2.app/Contents/Frameworks/BetterFontPicker.framework/Versions/A/BetterFontPicker' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/Applications/MacPorts/iTerm2.app/Contents/Frameworks/BetterFontPicker.framework/Versions/A/BetterFontPicker' (code signature in <ED4B4372-9E02-37AE-ADED-0A904093467D> '/Applications/MacPorts/iTerm2.app/Contents/Frameworks/BetterFontPicker.framework/Versions/A/BetterFontPicker' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), '/System/Library/Frameworks/BetterFontPicker.framework/Versions/A/BetterFontPicker' (no such file, not in dyld cache)
zsh: abort /Applications/MacPorts/iTerm2.app/Contents/MacOS/iTerm2
系统详细信息:
% uname -a
Darwin iMac.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:51:50 PDT 2023; root:xnu-8796.121.2~5/RELEASE_X86_64 x86_64
% port version
Version: 2.8.1
% codesign -v -d /Applications/MacPorts/iTerm2.app/Contents/MacOS/iTerm2
Executable=/Applications/MacPorts/iTerm2.app/Contents/MacOS/iTerm2
Identifier=com.googlecode.iterm2
Format=app bundle with Mach-O universal (x86_64 arm64)
CodeDirectory v=20500 size=144086 flags=0x10002(adhoc,runtime) hashes=4492+7 location=embedded
Signature=adhoc
Info.plist=not bound
TeamIdentifier=not set
Runtime Version=13.0.0
Sealed Resources version=2 rules=13 files=320
Internal requirements count=0 size=12
我猜罪魁祸首是Signature=adhoc
。有什么解决办法吗?
我尝试卸载并重新安装该端口,但没有帮助。
答案1
这篇文章讨论了这个问题 iTerm 2 在启动时崩溃。
据说问题是TeamIdentifier
没有设置。
最终意见是:
听起来像是 macports 的问题。请向他们报告!
我建议联系 MacPorts 支持 关于该问题,或者尝试寻找一个没有此问题的旧版本。