brew 를 이용하여 맥 어플리케이션을 설치 할 때, 아래와 같이 Permission 에러가 발생하는 경우가 있습니다.
❯ brew cask install slowquitapps
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (caskroom/cask).
No changes to formulae.
==> Satisfying dependencies
==> Downloading https://github.com/dteoh/SlowQuitApps/releases/download/v0.4.0/SlowQuitApps.z
Already downloaded: /Users/Roh/Library/Caches/Homebrew/Cask/slowquitapps--0.4.0.zip
==> Verifying checksum for Cask slowquitapps
==> Installing Cask slowquitapps
==> Purging files for version 0.4.0 of Cask slowquitapps
**Error: Permission denied @ dir_s_mkdir - /usr/local/Caskroom/slowquitapps**
Follow the instructions here:
https://github.com/caskroom/homebrew-cask
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:253:in `mkdir'
...위와 같은 에러가 발생할 경우, 어플리케이션이 설치 될 Path (위 예제에서는 /usr/local/Caskroom) 에 아래와 같이 권한을 부여하면 Permission 에러를 해결 할 수 있습니다.
❯ sudo install -d -o $(whoami) -g admin /usr/local/Caskroom
Password: 비밀번호
❯ brew cask install slowquitapps
Updating Homebrew...
==> Satisfying dependencies
==> Downloading https://github.com/dteoh/SlowQuitApps/releases/download/v0.4.0/SlowQuitApps.z
Already downloaded: /Users/Roh/Library/Caches/Homebrew/Cask/slowquitapps--0.4.0.zip
==> Verifying checksum for Cask slowquitapps
==> Installing Cask slowquitapps
==> Moving App 'SlowQuitApps.app' to '/Users/Roh/Applications/SlowQuitApps.app'.
🍺 slowquitapps was successfully installed!