Cannot contain specific cocoapods versions

Asked 1 years ago, Updated 1 years ago, 398 views

I wanted to make the current cocoapods version 1.11.2, so See this article

$gem install cocoapods-v1.11.2

I typed the command in the terminal.

Ignoring bigdecimal-2.0.0 because it extensions are not built.Try:gem pristine bigdecimal --version 2.0
Ignoring digest-crc-0.6.3 because it extensions are not built.Try:gem prestine digest-crc -- version 0.6.3
Ignoring unf_ext-0.0.7.7 because it extensions are not built.Try:gem pristine unf_ext --version 0.0.7.7
ERROR: While executing gem... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

The cocoapods could not be updated.
I think rbenv is probably the cause, so I'll refer to this article

$rbenv install 3.0.3

I typed .

Downloading openssl-1.1.1l.tar.gz...
->https://dqw8nmjcqpjn7.cloudfront.net/0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
Installing openssl-1.1.1l...
Installed openssl-1.1.1l to/Users/fujitayuusaku/.rbenv/versions/3.0.3

Downloading ruby -3.0.3.tar.gz...
->https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.3.tar.gz
Installing ruby - 3.0.3...
ruby-build —using readline from homebrew

BUILD FAILED (macOS 12.1 using ruby-build 20211203)

Inspector clean up the working tree at /var/folder/g8/c_ksvkx96m37bzwpng3m8tch0000gn/T/ruby-build.20211213020200.34028.OU0OiR
Results logged to/var/folder/g8/c_ksvkx96m37bzwpng3m8tch0000gn/T/ruby-build.20211213020200.34028.log

Last 10 log lines:
                                                                       ^
Infile included from compile.c:40:
./vm_callinfo.h:217:16:error:use of undeclared identifier 'RUBY_FUNCTION_NAME_STRING'
    if(debug)rp(ci);
               ^
./internal.h:95:72:note:expanded from macro'rp'
#define rp(obj)rb_obj_info_dump_loc(VALUE)(obj), __FILE__, __LINE_, RUBY_FUNCTION_NAME_STRING)
                                                                       ^
2 errors generated.
make:*** [compile.o] Error 1

I don't know what to do with it.
Thank you for your cooperation.

swift ruby xcode cocoapods rbenv

2022-09-30 22:00

1 Answers

$gem install cocoapods-v1.11.2
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

What you're running is probably a MacOS standard ruby gem command.
The MacOS standard ruby is located in the root administrator's area, so the end user does not have write permission.

/Library/Ruby/Gems$ls-l
total0
drwxr-xr-x6 root wheel 192 108 2019 2.3.0 /
drwxr-xr-x9 root wheel 288 10 29 22:03 2.6.0 /


2022-09-30 22:00

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.