Ionic Cordova平台添加ios失败,库未加载:usrlocaloptopensslliblibssl.1.0.0.dylib (LoadError)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ionic Cordova平台添加ios失败,库未加载:usrlocaloptopensslliblibssl.1.0.0.dylib (LoadError)相关的知识,希望对你有一定的参考价值。
我一直无法解决这个openSSL问题,试图将ios平台添加到Ionic应用中。我试过用Brew更新,重新安装openSSL。我试过更新Cocoa Pods,但得到同样的错误。我已经更新了Ionic和Cordova,更新了一些插件。还是同样的错误。以下是错误的堆栈跟踪
Running `pod install` (to install plugins)
Failed to install 'cordova-plugin-googlemaps': undefined
CordovaError: Promise rejected with non-error: "/Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
" +
' Referenced from: /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle
' +
' Reason: image not found - /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle
' +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/openssl.rb:13:in `<top (required)>'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:76:in `const_get'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:76:in `block (2 levels) in classes'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:75:in `each'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:75:in `inject'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:75:in `block in classes'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:72:in `map'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:72:in `classes'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:86:in `extend_classes!'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:89:in `block in <module:Error>'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:67:in `each'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:67:in `<module:Error>'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:22:in `<module:REST>'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest/error.rb:3:in `<top (required)>'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/nap-1.1.0/lib/rest.rb:104:in `<top (required)>'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/sources_manager.rb:3:in `<top (required)>'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/core_overrides.rb:1:in `<top (required)>'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods.rb:74:in `<module:Pod>'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods.rb:17:in `<top (required)>'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:36:in `<top (required)>'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/bin/pod:23:in `load'
" +
" from /Users/billbolte/.rbenv/versions/2.6.1/bin/pod:23:in `<main>'
"
at /Users/billbolte/Documents/Projects/customer-portal/node_modules/cordova/bin/cordova:30:15
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[ERROR] An error occurred while running subprocess cordova.
cordova platform add ios@5.1.1 --verbose exited with exit code 1.
以下是我的离子信息,如果需要的话
Ionic:
Ionic CLI : 6.6.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-webview 4.1.3, (and 19 other plugins)
Utility:
cordova-res (update available: 0.12.1) : 0.9.0
native-run : not installed
System:
ios-deploy : 1.10.0
ios-sim : 6.1.3
NodeJS : v13.13.0 (/usr/local/Cellar/node/13.13.0_1/bin/node)
npm : 5.10.0
OS : macOS Catalina
Xcode : Xcode 11.4.1 Build version 11E503a
有谁知道哪些地方需要更新、修正、删除等等?我假设这是Cocoa Pods的事情,因为运行 "pod env "会产生同样的错误。
答案
简而言之,我不得不将我当前的Ruby版本更新到2.7.1,使之成为全局版本,然后更新Cocoapods。然后我就能通过这个错误。
以上是关于Ionic Cordova平台添加ios失败,库未加载:usrlocaloptopensslliblibssl.1.0.0.dylib (LoadError)的主要内容,如果未能解决你的问题,请参考以下文章
Ionic + Angular - 平台添加 Android 错误 - 错误:无法获取平台 cordova-android@0.0.8
带有扩展名的应用程序的 Ionic/Cordova iOS 应用程序构建错误 - ** 存档失败 **
ionic cordova build ios 使用 xcode swift 3 框架安装自定义插件失败