LoginSignup
4
4

More than 5 years have passed since last update.

Homebrew-caskの移行手順

Posted at

Homebrew-caskでskypeをインストールしようとしたらエラーが出ました。

brew cask install skype
Error: Cask 'skype' definition is invalid: Bad header line: parse failed

公式によるとcaskはHomebewに含まれるようになったとのことです。
http://caskroom.io/
https://github.com/caskroom/homebrew-cask

早速Githubに記載されている内容にしたがってcaskを移行させましょう。
brew uninstall --force brew-cask; brew update

上手くいきませんでした。。。

Uninstalling brew-cask... (2,731 files, 1.4M)
Error: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other software may change permissions on this directory. Some versions of the "InstantOn" component of Airfoil or running Cocktail cleanup/optimizations are known to do this.

You should probably change the ownership and permissions of /usr/local
back to your user account.
  sudo chown -R $(whoami):admin /usr/local

どうやら書き込み権限がなくて怒られてる様でした。
念のためbrew doctorを叩いてみます。

Warning: The /usr/local is not writable.

You should probably change the ownership and permissions of /usr/local
back to your user account.
  sudo chown -R $(whoami) /usr/local

Warning: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other software may change permissions on this directory. Some versions of the "InstantOn" component of Airfoil or running Cocktail cleanup/optimizations are known to do this.

You should probably change the ownership and permissions of /usr/local
back to your user account.
  sudo chown -R $(whoami):admin /usr/local

Warningが2つ出てますが、実質叩くべきコマンドは
sudo chown -R $(whoami):admin /usr/local
ですね。

上記のコマンドを実行後、再度
brew uninstall --force brew-cask; brew update
を実行します。

brew uninstall --force brew-cask; brew update
Updated 1 tap (caskroom/cask).
No changes to formulae.

無事caskが移行されたようです。
ちゃんとインストールできるか試してみます。

brew cask install skype
==> Downloading https://www.skype.com/go/getskype-macosx.dmg
######################################################################## 100.0%
==> No checksum defined for Cask skype, skipping verification
==> Symlinking App 'Skype.app' to '/Applications/Skype.app'
🍺  skype staged at '/opt/homebrew-cask/Caskroom/skype/latest' (4911 files, 107M)

これで今までどおりhomebrew-caskが使えるようになりました。

4
4
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
4
4