Ionic Cordova平台添加ios失败,库未加载:usrlocaloptopensslliblibssl.1.0.0.dylib (LoadError)

问题描述 投票:1回答:1

我一直无法解决这个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)\n" +
  '  Referenced from: /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle\n' +
  '  Reason: image not found - /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle\n' +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/openssl.rb:13:in `<top (required)>'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /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'\n" +
  "\tfrom /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'\n" +
  "\tfrom /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'\n" +
  "\tfrom /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'\n" +
  "\tfrom /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'\n" +
  "\tfrom /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'\n" +
  "\tfrom /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'\n" +
  "\tfrom /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!'\n" +
  "\tfrom /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>'\n" +
  "\tfrom /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'\n" +
  "\tfrom /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>'\n" +
  "\tfrom /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>'\n" +
  "\tfrom /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)>'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /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)>'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /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)>'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /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)>'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /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>'\n" +
  "\tfrom /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)>'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:36:in `<top (required)>'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/bin/pod:23:in `load'\n" +
  "\tfrom /Users/billbolte/.rbenv/versions/2.6.1/bin/pod:23:in `<main>'\n"
    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 [email protected] --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 ([email protected])
   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 "会产生同样的错误。

cordova ionic-framework openssl cocoapods rbenv
1个回答
1
投票

简而言之,我不得不将我当前的Ruby版本更新到2.7.1,使之成为全局版本,然后更新Cocoapods。然后我就能通过这个错误。

热门问题
推荐问题
最新问题