简体   繁体   English

在OS X 10.10.5的Macbook Pro上显示“ COMMAND(权限被拒绝)”错误的pod COMMAND(安装,初始化,安装)错误

[英]pod COMMAND(setup, init, install) showing “Permission denied” error on Macbook Pro with OS X 10.10.5

I'm getting "Permission denied" error when i am executing any command on terminal. 在终端上执行任何命令时,出现“权限被拒绝”错误。 The macbook which I'm using is running on OS X 10.10.5, and also this macbook is provide by my company so it having some permission levels. 我正在使用的Macbook在OS X 10.10.5上运行,并且此Macbook由我公司提供,因此具有一定的权限级别。 But I made my login as admin login. 但是我以管理员登录名登录。 When i'm executing "pod setup —verbose" command I'm getting below errors 当我执行“ pod setup -verbose”命令时,出现以下错误

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:959:in `read': Permission denied - /Library/Ruby/Gems/2.0.0/specifications/terminal-notifier-1.6.0.gemspec (Errno::EACCES)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:959:in `load'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:644:in `block (2 levels) in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in `block in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:658:in `each_normal'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:669:in `_all'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:822:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `find_all'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `matching_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:277:in `to_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /usr/bin/pod:22:in `<main>'

I tried almost all the solutions available, but I didn't get the solution. 我尝试了几乎所有可用的解决方案,但没有得到解决方案。 Please help he on this. 请帮助他。

Update 更新资料

If i use the commands with sudo i am getting below errors. 如果我将命令与sudo一起使用,则会出现以下错误。

/Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:417:in `help!': [!] You cannot run CocoaPods as root. /Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:417:在`help!'中:[!]您不能以root身份运行CocoaPods。 (CLAide::Help) (CLAide :: Help)

Usage: 用法:

$ pod COMMAND

  CocoaPods, the Cocoa library package manager.

Commands: 命令:

+ cache      Manipulate the CocoaPods cache
+ init       Generate a Podfile for the current directory.
+ install    Install project dependencies to Podfile.lock versions
+ ipc        Inter-process communication
+ lib        Develop pods
+ list       List pods
+ outdated   Show outdated project dependencies
+ repo       Manage spec-repositories
+ setup      Setup the CocoaPods environment
+ spec       Manage pod specs
+ update     Update outdated project dependencies and create new Podfile.lock

Options: 选项:

--silent     Show nothing
--version    Show the version of the tool
--verbose    Show more debugging information
--no-ansi    Show output without ANSI codes
--help       Show help banner of specified command
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:44:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>'
from /usr/bin/pod:23:in `load'

I suggest you to look at this post 我建议你看看这篇文章

https://stackoverflow.com/a/14607772/5433235 https://stackoverflow.com/a/14607772/5433235

Did you try to install rvm https://rvm.io/rvm/install and then run 'pod install' ? 您是否尝试过安装rvm https://rvm.io/rvm/install ,然后运行“ pod install”?

Try to update permission on CocoaPods 尝试更新CocoaPods的权限

sudo chown -R $USER ~/Library/Caches/CocoaPods

sudo chown -R $USER ~/.cocoapods

Try running "pod install" and see if it fixed your problem. 尝试运行“ pod安装”,看看它是否解决了您的问题。

If you still getting permission denied, try: 如果仍然遭到拒绝,请尝试:

sudo chown -R $USER ./Pods

Also you might need to remove old podfile.lock before running pod install 另外,您可能需要在运行pod install之前删除旧的podfile.lock。

Depending on the Pod Update you are trying to run, the original folder that was downloaded may not have given you read/write access. 根据您尝试运行的Pod Update,下载的原始文件夹可能没有授予您读/写访问权限。 Navigate to that folder in Finder and right click to get info. 导航到Finder中的文件夹,然后右键单击以获取信息。 Go to permissions and check to see that your user name is listed and have read/write access. 转到权限并检查是否列出了您的用户名,并且具有读/写访问权限。 If not add your user name and give yourself the rights. 如果没有,请添加您的用户名并赋予自己权利。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试在Mac OS X Lion中安装pip时出现权限被拒绝错误 - Permission denied error when trying to install pip in Mac OS X Lion 在mac os x上运行cf命令时获取权限被拒绝错误 - Getting permission denied error when running cf command on mac os x 我无法在Mac OS X 10.10.5上安装Theano - I can't install Theano on Mac OS X 10.10.5 “pod install”命令在Mac OS X上有什么作用? - What does the “pod install” command do on Mac OS X? 在Mac OS 10.10.5上安装poplib - Install poplib on Mac OS 10.10.5 尝试使用OS X Yosemite版本10.10.5在MAC Pro Retina上的Eclipse Mars上调试C ++程序 - Trying to Debug C++ Program on Eclipse Mars on MAC Pro Retina with OS X Yosemite Version 10.10.5 在Mac OS X上运行Ant构建时出现“权限被拒绝”错误 - “Permission denied” error when running Ant build on Mac OS X 在Macbook Pro(OS X Yosemite)上设置Oracle数据库 - Setting up the Oracle database on Macbook Pro (OS X Yosemite) Python 认证错误 - Certificate.command 安装不起作用/权限被拒绝? - Python certification error - Certificate.command install not working/ permission denied? 在没有MAMP的OS X上本地安装wordpress(权限错误) - install wordpress locally on OS X without MAMP (permission error)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM