brew link sdl 无法 link 给予权限被拒绝错误

brew link sdl unable to link giving permission denied error

我无法将 brew 下载到 link pygame,当我尝试安装 pygame 时出现权限错误

$ brew install pygame
==> Installing pygame from homebrew/homebrew-python
Error: You must `brew link sdl' before pygame can be installed
$ brew link sdl
Linking /usr/local/Cellar/sdl/1.2.15... 
Error: Could not symlink share/man/man3/SDLKey.3
/usr/local/share/man/man3 is not writable.

从这个错误消息中我不清楚我应该 symlink?

https://www.youtube.com/watch?v=c_TzqzKZpMw 我就是这样做的。一开始很困惑

您应该 return 使用 sudo chown -R $(whoami) /usr/local/share 访问您的用户帐户的这些路径的所有权。