0
編譯我的應用程序的發行版並將該軟件包複製到另一臺計算機進行測試。崩潰與此:嘗試在「代碼簽名無效」錯誤的另一臺計算機上運行應用程序發行版時失敗
Dyld Error Message:
Library not loaded: @rpath/libxxx.dylib
Referenced from: /Users/USER/Downloads/*/ndncon.app/Contents/MacOS/ndncon
Reason: no suitable image found. Did find:
/Users/remap/Downloads/ndncon2-testing/ndncon.app/Contents/MacOS/../Frameworks/libxxx.dylib: code signature invalid for '/Users/remap/Downloads/ndncon2-testing/ndncon.app/Contents/MacOS/../Frameworks/libxxx.dylib'
我跑了驗證:
$ codesign -vv --deep-verify /Users/remap/Downloads/ndncon2-testing/ndncon.app
/Users/remap/Downloads/ndncon2-testing/ndncon.app: valid on disk
/Users/remap/Downloads/ndncon2-testing/ndncon.app: satisfies its Designated Requirement
和
$ codesign -dvv /Users/remap/Downloads/ndncon2-testing/ndncon.app
Executable=/Users/remap/Downloads/ndncon2-testing/ndncon.app/Contents/MacOS/ndncon
Identifier=ucla.edu.ndncon
Format=bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=8819 flags=0x0(none) hashes=434+3 location=embedded
Signature size=4688
Authority=Mac Developer: [email protected] (H79XXXX834)
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
Signed Time=Dec 1, 2016, 12:51:19 PM
Info.plist entries=26
TeamIdentifier=XXXXXXXXX
Sealed Resources version=2 rules=12 files=44
Internal requirements count=1 size=180
最後,
$ sudo spctl --assess -v /Users/remap/Downloads/ndncon2-testing/ndncon.app
/Users/remap/Downloads/ndncon2-testing/ndncon.app: accepted
override=security disabled
不知道爲什麼它抱怨1)內部動態圖書館和2)爲什麼它抱怨所有?
感謝您的洞察!即使我的版本是El Captain 10.11.6,我認爲這可能是問題。我會檢查這個。那麼你是如何解決它的? – peetonn
重建指定較早的部署目標。一個簡單的方法可能是在較早版本的OS X上重新構建庫並複製它。 – hemancuso
試圖重建爲10.10和10.9 - 沒有幫助。該庫是使用GNU autotools構建的,你知道它是否將庫與特定的macOS版本聯繫起來? – peetonn