简体   繁体   English

安装时出现Byebug错误

[英]Byebug error while installing

I am having problems installing byebug : 我在安装byebug时遇到问题:

Errno::EACCES: Permission denied @ dir_s_mkdir -
/Users/CTO/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/byebug-5.0.0
An error occurred while installing byebug (5.0.0), and Bundler cannot continue.
Make sure that gem install byebug -v '5.0.0' succeeds before bundling.

I ran the recommended install command and got this: 我运行了推荐的安装命令,并得到了以下信息:

Building native extensions. This could take a while...
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ dir_s_mkdir - /Users/CTO/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/byebug-5.0.0

Help will be much appreciated 帮助将不胜感激

You're getting a permission denied error when trying to install a gem in your local copy of rbenv , so I'm guessing there are some files in that directory that aren't owned by your user. 尝试在rbenv的本地副本中安装gem时,遇到权限拒绝错误,因此我猜该目录中的某些文件不属于您的用户。

To verify this, you could run the following command to identify any files that aren't owned by your user (assuming your username is CTO ): 为了验证这一点,您可以运行以下命令来识别用户不拥有的任何文件(假设您的用户名是CTO ):

find ~/.rbenv \! -user CTO

If that is indeed the problem, you can run the following to fix it: 如果确实存在问题,则可以运行以下命令来解决此问题:

sudo chown -R CTO ~/.rbenv

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM