Homebrewは更新できましたので、CocoaPodsのインストールを再々実行しました。
$ brew install cocoapods
Warning: Treating cocoapods as a formula. For the cask, use homebrew/cask/cocoapods
==> Downloading https://ghcr.io/v2/homebrew/core/cocoapods/manifests/1.14.3
…
==> Pouring cocoapods--1.14.3.ventura.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/pod
Target /usr/local/bin/pod
already exists. You may want to remove it:
rm '/usr/local/bin/pod'
To force the link and overwrite all conflicting files:
brew link --overwrite cocoapods
To list all files that would be deleted:
brew link --overwrite --dry-run cocoapods
Possible conflicting files are:
/usr/local/bin/pod
/usr/local/bin/xcodeproj
==> Summary
🍺 /usr/local/Cellar/cocoapods/1.14.3: 13,791 files, 28.8MB
==> Running `brew cleanup cocoapods`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
CocoaPodsのインストール自体は、成功しましたが、/usr/local/bin配下に古いcocoapodsがあるため上書きできなかったようです。
したがって、手動でcocoapodsのリンクを付け替えました。
$ cd /usr/local/bin
$ mv pod pod.bak
$ brew link --overwrite cocoapods