Resetting the permission in /usr/local

macOS update ํ›„ ๋ฐœ์ƒํ•œ ๊ถŒํ•œ ๋ฌธ์ œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ๊ณต์œ ํ•ด์š”

Problem

: brew cleanup ๋ช…๋ น์–ด ์‹คํ–‰ ์‹œ ์•„๋ž˜์˜ error๋ฅผ ๋ฑ‰์Œ

Error: Permission denied @ apply2files - /usr/local/lib/node_modules/serverless/node_modules/.bin/detect-libc

Cause

: macOS to Mojave 10.14.X ์ด์ƒ version์œผ๋กœ upgrade ํ›„ ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ๋ผ๊ณ  ํ•จ

Reference - Homebrew github issue

Solution

: /usr/local ์— ๋ถ€์—ฌ๋œ ๊ถŒํ•œ์„ resetํ•˜๋Š” ์•„๋ž˜์˜ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•œ๋‹ค

sudo chown -R $(whoami):admin /usr/local/* \
&& sudo chmod -R g+rwx /usr/local/*

ํ•ด๊ฒฐ ์™„๋ฃŒ!

Last updated