1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

XcodeでOpenCVの実行時に code signature not valid エラーが出たら

Last updated at Posted at 2020-09-09

XcodeのDisable Library Validationにチェックすると、解消します。

Screen Shot 2020-09-09 at 19.45.03.png

エラー

dyld: Library not loaded: /usr/local/opt/opencv/lib/libopencv_features2d.4.4.dylib
  Referenced from: /Users/oosuyuuki/Library/Developer/Xcode/DerivedData/RectangleDetection-akoxhwvgxqqsyydewscmnhcsbdzy/Build/Products/Debug/RectangleDetection
  Reason: no suitable image found.  Did find:
	/usr/local/opt/opencv/lib/libopencv_features2d.4.4.dylib: code signature in (/usr/local/opt/opencv/lib/libopencv_features2d.4.4.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
	/usr/local/lib/libopencv_features2d.4.4.dylib: code signature in (/usr/local/lib/libopencv_features2d.4.4.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
	/usr/local/Cellar/opencv/4.4.0_1/lib/libopencv_features2d.4.4.0.dylib: code signature in (/usr/local/Cellar/opencv/4.4.0_1/lib/libopencv_features2d.4.4.0.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
(lldb) 

原因

GatekeeperとSoftware notarizedによる制限のようです。下記の記事が参考になります。
https://qiita.com/Arime/items/e1df2a8c3d4c2ce75069

参考

XcodeでOpenCVを使う手順については、下記の記事が参考になります。
https://qiita.com/KakeruMasuda/items/49d369ab49fac5ea3eab

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?