1
0

More than 1 year has passed since last update.

rbenvのインストールで失敗する

Posted at

動作環境

M1 macboook pro
macOS Monterey ver.12.5

解決方法

ターミナルでbrew install rbenvを実行すると、以下のエラーが表示する。

==> Downloading https://ghcr.io/v2/homebrew/core/pkg-config/manifests/0.29.2_3
Already downloaded: /Users/arakijun/Library/Caches/Homebrew/downloads/ac691fc7ab8ecffba32a837e7197101d271474a3a84cfddcc30c9fd6763ab3c6--pkg-config-0.29.2_3.bottle_manifest.json
Error: rbenv: Failed to download resource "pkg-config_bottle_manifest"
The downloaded GitHub Packages manifest was corrupted or modified (it is not valid JSON): 
/Users/(ユーザーネーム)/Library/Caches/Homebrew/downloads/ac691fc7ab8ecffba32a837e7197101d271474a3a84cfddcc30c9fd6763ab3c6--pkg-config-0.29.2_3.bottle_manifest.json

これは、 homebrewのキャッシュが原因のようなので、以下のコマンドをそれぞれ実行する。

$ brew cleanup
$rm -rf /Users/myusername/Library/Caches/Homebrew/downloads/*

途中で本当にキャッシュをクリアにするか聞かれるので"y"を入力すると、成功する。

その後、再度brew install rbenvを実行すると、rbenvのインストールに成功する。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0