添加 ios 时离子电容器出错:找不到符号 - /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0/lib/bigdecimal.bundle
Posted
技术标签:
【中文标题】添加 ios 时离子电容器出错:找不到符号 - /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0/lib/bigdecimal.bundle【英文标题】:error in ionic capacitor when add ios: symbol not found - /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0/lib/bigdecimal.bundle 【发布时间】:2021-03-11 10:25:46 【问题描述】:我是 ios 新手。 (我使用的是带有 M1 芯片的 macmini)。
我在 windows 上构建了一个离子项目(带电容器)并创建了 android 应用程序,没有任何错误。
但是当我切换到 mac 并运行命令 npx cap add ios
时出现错误 symbol not found - /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0/lib/bigdecimal.bundle
。
以下是运行命令npx cap add ios
的结果:
% npx cap add ios
ℹ Installing iOS dependencies – Skipping: already installed
✔ Adding native xcode project in: /Users/username/Documents/AppName/ios in 15.44ms
✔ add in 16.67ms
✔ Copying web assets from www to ios/App/public in 248.71ms
✔ Copying native bridge in 3.05ms
✔ Copying capacitor.config.json in 2.60ms
✔ copy in 262.60ms
✔ Updating iOS plugins in 3.08ms
Found 0 Capacitor plugins for ios:
✖ Updating iOS native dependencies with "pod install" (may take several minutes):
✖ update ios:
[error] /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require': dlsym(0x7fd7c441b9b0, Init_bigdecimal): symbol not found - /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0/lib/bigdecimal.bundle (LoadError)
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0/lib/bigdecimal.rb:1:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Gems/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/xml_mini.rb:5:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Gems/2.6.0/gems/activesupport-5.2.4.5/lib/active_support/core_ext/array/conversions.rb:3:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Users/anastamimi/.gem/ruby/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods.rb:9:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Users/anastamimi/.gem/ruby/2.6.0/gems/cocoapods-1.10.1/bin/pod:36:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
【问题讨论】:
【参考方案1】:以下链接帮助我解决了类似的问题 (LoadError - dlsym(0x7fe291e235f0, Init_ffi_c): symbol not found - /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle ):
查看https://github.com/ionic-team/capacitor/issues/3897底部的解决方案
在 Finder 中右键单击 Terminal 获取信息 与罗塞塔一起打开
sudo gem install ffi(在我的案例中 ffi 是缺少的组件)
【讨论】:
以上是关于添加 ios 时离子电容器出错:找不到符号 - /Library/Ruby/Gems/2.6.0/gems/bigdecimal-3.0.0/lib/bigdecimal.bundle的主要内容,如果未能解决你的问题,请参考以下文章
在 Windows 上安装离子推送插件(适用于 iOS)时出错
CocoaPods 找不到 pod“Capacitor”的兼容版本