ruby CocoaPods permission denied(Errno::EACCES - Permission denied @ dir_s_mkdir)

f0brbegy  于 2023-08-04  发布在  Ruby
关注(0)|答案(3)|浏览(117)

当我在添加pod 'Firebase/Storage'后尝试pod install时,我得到此错误...
错误号::EACCES -权限被拒绝@目录_s_mkdir - /用户/下载/资源库/缓存/CocoaPods
那个文件夹根本不存在?有什么想法吗?我试过pod update,卸载和重新安装等。
以下是完整的错误...

$ pod install
Analyzing dependencies
Downloading dependencies
Using BoringSSL (9.1)
Installing Firebase 4.8.0

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

/usr/local/bin/pod install


### Report

* What did you do?

* What did you expect to happen?

* What happened instead?

### Stack

CocoaPods : 1.5.3
Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
RubyGems : 2.5.2
Host : Mac OS X 10.13.5 (17F77)
Xcode : 9.4.1 (9F2000)
Git : git version 2.15.2 (Apple Git-101.1)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 0f34dee0f260b4b053d1a2bf5d529c3c7fd31380


### Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.0
cocoapods-try : 1.1.0


### Podfile

```ruby
platform :ios, '9.0'

target 'Sudsters' do

  use_frameworks!
    pod 'Firebase/Core'
    pod 'Firebase/Firestore'
    pod 'Firebase/Messaging'
    pod 'Firebase/Storage'

end

Error

Errno::EACCES - Permission denied @ dir_s_mkdir - /Users/nachshonfertel/Library/Caches/CocoaPods
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:253:in `mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:253:in `fu_mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:227:in `block (2 levels) in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:225:in `reverse_each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:225:in `block in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:211:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:211:in `mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/pathname.rb:576:in `mkpath'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/config.rb:90:in `cache_root'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/downloader.rb:33:in `download'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_installer.rb:121:in `download_source'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_installer.rb:60:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:374:in `install_source_of_pod'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:339:in `block (2 levels) in install_pod_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:85:in `titled_section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:338:in `block in install_pod_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:321:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:321:in `install_pod_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:164:in `block in download_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:162:in `download_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:117:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

字符串

tnkciper

tnkciper1#

我在这里回答:CocoaPods folder does not exist / permissions error
这花了我整整两天的时间才弄清楚!

zf2sa74q

zf2sa74q2#

我能够通过去

/Users/{myusername}/Library/Caches/

字符串

在Finder中手动添加文件夹

CocoaPods


当您再次运行pod install时,Cocoapods会处理其余的事情。

i7uaboj4

i7uaboj43#

使用了

sudo pod install --allow-root

字符串

相关问题