当前位置:   article > 正文

ERROR: While executing gem ... (Gem::FilePermissionError) You don‘t have write permissions for

error: while executing gem ... (gem::filepermissionerror) you don't have wri

安装或者更新CocoaPods时候报错:

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.
  • 1
  • 2

1.删除CocoaPods;

2.用命令which -a ruby,查看只有一个系统自带的ruby目录。

chunxiao@bogon ios % which -a ruby
/usr/bin/ruby
  • 1
  • 2

3.使用命令brew install ruby安装一个最新版本的ruby

Running `brew update --auto-update`...
Error: Failed to download https://formulae.brew.sh/api/cask.jws.json!
==> Homebrew collects anonymous analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).

==> homebrew/core is old and unneeded, untapping to save space.
Untapping homebrew/core...
Untapped 3 commands and 6649 formulae (7,084 files, 481.3MB).
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################## 100.0%
==> Auto-updated Homebrew!
Updated 3 taps (dart-lang/dart, homebrew/core and homebrew/cask).
==> New Formulae
abi3audit                       onionprobe
action-validator                opentofu
adb-enhanced                    orbiton
aerleon                         orbuculum
ain                             orcania
alass                           orogene
ali                             osctrl-cli
amass                           oslo
ansible@8                       pan
apify-cli                       patat
apkleaks                        patch-package
apprise                         pciutils
appstream                       pdfalyzer
arm-none-eabi-binutils          perl-xml-parser
arm-none-eabi-gcc               pgrok
arm-none-eabi-gdb               php@8.2
asitop                          phylum-cli
asn                             pixi
asnmap                          plog
auditwheel                      pmix
authz0                          pop
awscli-local                    postgresql@16
bacon                           powerlevel10k
badkeys                         presenterm
bandicoot                       prettierd
bao                             proxify
bashunit                        proxygen
bazel-diff                      pter
bazel-remote                    pwned
bbot                            pylyzer
bfs                             pypy3.10
bilix                           pypy3.9
biodiff                         pyspelling
biome                           pystring
bkcrack                         python-abseil
blades                          python-anytree
blake3                          python-argcomplete
blink                           python-asn1crypto
bob                             python-attrs
bomber                          python-boto3
botan@2                         python-botocore
bounceback                      python-brotli
bozohttpd                       python-cachetools
build2                          python-certifi
caracal                         python-chardet
cargo-all-features              python-charset-normalizer
cargo-auditable                 python-cli-helpers
cargo-binstall                  python-click
cargo-binutils                  python-colorama
cargo-deps                      python-configargparse
cargo-docset                    python-configobj
cariddi                         python-cryptography
cbonsai                         python-cycler
cdi                             python-dateutil
cdxgen                          python-dicttoxml
certgraph                       python-distlib
certsync                        python-distro
cf2tf                           python-docopt
cfripper                        python-filelock
chainloop-cli                   python-flit-core
chainsaw                        python-gdbm@3.12
changie                         python-hatch-fancy-pypi-readme
chaoskube                       python-hatch-vcs
checkdmarc                      python-hatchling
cherrybomb                      python-idna
cidr                            python-jinja
cliam                           python-jmespath
cloud-sql-proxy                 python-json5
cloudfox                        python-kiwisolver
cloudlist                       python-lxml
cloudsplaining                  python-magic
codelimit                       python-mako
coder                           python-markdown-it-py
colmap                          python-markupsafe
couchbase-shell                 python-matplotlib
counts                          python-mdurl
cppinsights                     python-mpmath
crabz                           python-msgpack
crunchy-cli                     python-mutagen
cryptopp                        python-networkx
crystalline                     python-oauthlib
csprecon                        python-openapi3
ctpv                            python-packaging
cyclonedx-gomod                 python-pathspec
cyclonedx-python                python-pbr
cycode                          python-platformdirs
czkawka                         python-pluggy
daktilo                         python-ply
dart-lang/dart/dart@2.19        python-prompt-toolkit
dart-lang/dart/dart@3.0         python-psutil
dcp                             python-pycurl
der-ascii                       python-pyparsing
dezoomify-rs                    python-pyproject-hooks
dicebear                        python-pytz
diffoci                         python-regex
dnsrobocert                     python-requests
dockerfile-language-server      python-requests-oauthlib
dockly                          python-rich
dolphie                         python-s3transfer
doppler                         python-setuptools
dovi_tool                       python-setuptools-scm
driftwood                       python-sympy
dysk                            python-termcolor
eatmemory                       python-tk@3.12
ebook2cw                        python-toml
erg                             python-trove-classifiers
erlang@25                       python-urllib3
espflash                        python-wcwidth
eza                             python-websocket-client
faircamp                        python-xlsxwriter
falco                           python@3.12
falcoctl                        qalculate-qt
favirecon                       qbittorrent-cli
feishu2md                       quictls
flyscrape                       rapidfuzz-cpp
frozen                          raven
fuc                             rdap
fw                              recoverpy
fwupd                           redwax-tool
gdrive@2                        reflex
geoip2fast                      regclient
ggshield                        rekor-cli
ghc@9.4                         retry
ghc@9.6                         richgo
gickup                          rio
gismo                           riscv64-elf-binutils
git-mediate                     riscv64-elf-gcc
gitea                           riscv64-elf-gdb
gitsign                         risor
gittuf                          roadrunner
go@1.20                         rpmspectool
goread                          ruff-lsp
goresym                         ruler
gossip                          runme
gotestwaf                       s3scanner
gotpm                           saf-cli
govulncheck                     sbom-tool
gptline                         scarb
graphqlviz                      scikit-image
haiti                           scilla
helidon                         scoutsuite
hex                             scrapy
hoverfly                        sh4d0wup
hyfetch                         shell2http
img2pdf                         shellspec
imgdiet                         shuffledns
imgdiff                         sickchill
immer                           sigma-cli
incus                           signmykey
instaloader                     sigstore
intercept                       skate
invoice                         sloth
iocextract                      smlfmt
ittapi                          snakeviz
jprq                            snyk-cli
jr                              solo2-cli
json2ts                         solr@8.11
jupyter-r                       spacer
karmadactl                      spglib
katana                          spicetify-cli
kew                             spidermonkey@91
killport                        sqlfmt
kor                             sqlpage
kosli-cli                       sqlsmith
lager                           squealer
ldeep                           squiid
ldid-procursus                  ssh-mitm
legitify                        sshportal
libconfini                      strip-nondeterminism
libcyaml                        surelog
libdicom                        tailspin
libdivsufsort                   tailwindcss
libdpp                          talhelper
libgit2@1.6                     telegram-downloader
libimobiledevice-glue           terraform-graph-beautifier
libjcat                         terraform-local
libjuice                        terragrunt-atlantis-config
libmapper                       texttest
libnghttp3                      tf-profile
libpanel                        three-body
libsail                         tlrc
libshumate                      toxiproxy
libversion                      tpm
libxmlb                         trafilatura
llm                             trufflehog
llvm@16                         trzsz-ssh
lr                              tzdiff
lune                            udp2raw-multiplatform
lxi-tools                       uffizzi
mailpit                         uhdm
mariadb@11.0                    uncover
mariadb@11.1                    urlfinder
massdriver                      uvicorn
mediamtx                        vet
medusa                          virtctl
memray                          vulkan-utility-libraries
mentat                          vulsio-gost
meson-python                    vunnel
mfem                            web-ext
mgis                            webpod
minder                          wget2
mjml                            whisper-cpp
modsecurity                     witness
modsurfer                       woodpecker-cli
mtbl                            woof-doom
mvfst                           wormhole-william
mvt                             wpscan
mysql-client@8.0                wtfis
mysql@8.0                       xe
neonctl                         xeol
netlistsvg                      xlsxio
node@20                         xnvme
noir                            yazi
notation                        yder
ntbtls                          yyjson
numbat                          zchunk
nvimpager                       zix
ollama                          zug
==> New Casks
4k-video-downloaderplus         low-profile
affine                          luniistore
aifun                           maa
akuity                          macgpt
amie                            mdb-accdb-viewer
apidog                          mediamate
applite                         meld-studio
ava                             metamer
batchoutput-pdf                 mindmac
batteryboi                      mitmproxy
bepo                            modrinth
bezel                           monotype
brickstore                      music-decoy
browser-deputy                  mutedeck
btp                             muyu
chainner                        mycard
chatall                         nvs
cilicon                         ok-json
clibor                          orka3
clickhouse                      ovito
clinq                           ovito-pro
clop                            paulxstretch
cloudnet                        picoscope
codewhisperer                   pieces
commandpost                     pieces-os
crystalfetch                    piphero
deskpad                         playdate-mirror
deveco-studio                   poe
devtunnel                       proton-drive
dockx                           proxy-audio-device
douyin-chat                     recipeui
drata-agent                     replay
draw-things                     reqable
dropbox-dash                    rippling
dropshelf                       ripx
ecodms-client                   rode-central
effect-house                    routine
elektron-overbridge             rustrover
elektron-transfer               score
energiza                        screen-studio
ente                            sf
expo-orbit                      sfm
fedistar                        shattered-pixel-dungeon
finbar                          showmeyourhotkeys
flexoptix                       simple-web-server
floorp                          simplex
font-finagler                   songkong
fossa                           space-capsule
free-podcast-transcription      spacedrive
git-credential-manager          sparkplate
glaze                           spundle
greenery                        stash
gstreamer-development           telegram-a
gstreamer-runtime               ths
herd                            timemachinestatus
hhkb                            to-audio-converter
hides                           tunetag
hoppscotch                      twelite-stage
hovrly                          updf
hp-easy-admin                   viso
hypercal                        voicepeak
iem-plugin-suite                wetype
jazz2-resurrection              whisky
json-viewer                     wiso-steuer-2022
jukebox                         wiso-steuer-2023
keyclu                          writerside
keymapp                         xiaomi-cloud
kreya                           xliff-editor
kuaitie                         xsplit-vcam
libndi                          zspace
lm-studio                       zui

You have 5 outdated formulae installed.

==> Fetching dependencies for ruby: ca-certificates, openssl@3 and readline
==> Fetching ca-certificates
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-b
######################################################## 100.0%
==> Fetching openssl@3
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-b
######################################################## 100.0%
==> Fetching readline
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-b
######################################################## 100.0%
==> Fetching ruby
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-b
######################################################## 100.0%
==> Installing dependencies for ruby: ca-certificates, openssl@3 and readline
==> Installing ruby dependency: ca-certificates
==> Pouring ca-certificates-2023-08-22.all.bottle.1.tar.gz
==> Regenerating CA certificate bundle from keychain, this may 
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/483186
推荐阅读