如何在运行`brew link automake`时修复"无法符号链接"错误?

ZhA*_*iyI 2 homebrew automake

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/aclocal/README
/usr/local/share/aclocal is not writable.

You can try again using:   brew link automake
Run Code Online (Sandbox Code Playgroud)

当我再次尝试时,它显示相同的错误.

Dar*_*zer 6

我有一个类似的错误:

$ brew link pkg-config
Linking /usr/local/Cellar/pkg-config/0.28...
Error: Could not symlink share/aclocal/pkg.m4
/usr/local/share/aclocal is not writable.
Run Code Online (Sandbox Code Playgroud)

我修复了这个: sudo chown -R $(whoami) /usr/local/share/