sudo chown -R $(whoami) /usr/local 把/use/local的owner換成自己,就有write權限了 whoami就是一個命令,會echo當前登錄用戶的名字。當然你知道自己的用戶名,比如jack,就直接 sudo chown -R jack /usr/local