Failed to load dynamic library

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Failed to load dynamic library相关的知识,希望对你有一定的参考价值。

参考技术A dart ffi 的 helloworld sample 跑不起来

Unhandled exception:

Invalid argument(s): Failed to load dynamic library (dlopen(./hello_library/libhello.dylib, 1): no suitable image found.  Did find:

        file system relative paths not allowed in hardened programs)

#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:55)

#1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:20:12)

#2      main (file:///Users/chenjiangfeng/github/dart-samples/ffi/hello_world/hello.dart:18:36)

#3      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:301:19)

#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

签名问题。

dart sdk已经签名了,要调用dylib,被调用的dylib需要跟dart同签名才行,但你又没有dart sdk的签名。

解决方法:清除dart sdk的签名

codesign --remove-signature`which dart`

以上是关于Failed to load dynamic library的主要内容,如果未能解决你的问题,请参考以下文章

google recaptcha failed to load怎么办

微信小程序,报错,failed to load local image resource /pages/

How to scroll down with Phantomjs to load dynamic content

GlideException: Failed to load resource……java.net.SocketTimeoutException(failed to connect to xxx)

GlideException: Failed to load resource……java.net.SocketTimeoutException(failed to connect to xxx)

怎么解决Chrome浏览器“Failed to load resource:net:ERR