gpt4 book ai didi

ios - 安装 Cocoapods 0.35.0 时出错

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:54:07 30 4
gpt4 key购买 nike

我正在尝试使用以下命令安装 Cocoapods 版本 0.35.0:

sudo gem install cocoapods --version 0.35.0

当我尝试验证版本时

pod --version

我收到以下错误:

---------------------------------------------
Error loading the plugin with path `/Library/Ruby/Gems/2.0.0/gems/cocoapods-try-0.4.5/lib/cocoapods_plugin.rb`.

NoMethodError - undefined method `tmpdir' for Dir:Class
/Library/Ruby/Gems/2.0.0/gems/cocoapods-try-0.4.5/lib/pod/command/try.rb:66:in `<class:Try>'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-try-0.4.5/lib/pod/command/try.rb:8:in `<class:Command>'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-try-0.4.5/lib/pod/command/try.rb:5:in `<module:Pod>'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-try-0.4.5/lib/pod/command/try.rb:4:in `<top (required)>'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:121:in `require'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:121:in `require'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-try-0.4.5/lib/cocoapods_plugin.rb:1:in `<top (required)>'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:121:in `require'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:121:in `require'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command/plugins_helper.rb:104:in `safe_require'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command/plugins_helper.rb:32:in `block in load_plugins'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command/plugins_helper.rb:31:in `each'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command/plugins_helper.rb:31:in `load_plugins'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:265:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
---------------------------------------------

0.35.0

我尝试卸载 cocoapods 和 xcodeproj 并重新安装,但它不起作用。我以前有过其他三个类似的错误,但我用

摆脱了它们
sudo gem update --system

仍然无法修复最后一个错误。

最佳答案

遇到了同样的问题。 Cocoapods 更改了对 cocoapods_plugin.rb 的读取权限。尝试:

sudo chmod 644/Library/Ruby/Gems/2.0.0/gems/cocoapods-stats-0.6.0/lib/cocoapods_plugin.rb

关于ios - 安装 Cocoapods 0.35.0 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30913578/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com