3

codesign an unsigned library

 1 year ago
source link: https://fann.im/blog/2021/10/21/codesign-an-unsigned-library/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

codesign an unsigned library

Oct 21, 2021

Some Python modules are not signed, will raise ImportError on M1 macOS:

ImportError: dlopen(/tmp/test/.venv/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so, 2): no suitable image found.  Did find:
	/tmp/test/.venv/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so: code signature in (/tmp/test/.venv/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so) not valid for use in process using Library Validation: Trying to load an unsigned library

You can use xcrun codesign to sign the library so: xcrun codesign -s - <path>. Here is:

xcrun codesign --sign - /tmp/test/.venv/lib/python3.9/site-packages/regex/_regex.cpython-39-darwin.so

Was this page helpful?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK