一畜号、執(zhí)行brew link pkg-config
返回結(jié)果Linking /usr/local/Cellar/pkg-config/0.29.1_2...
Error: Could not symlink bin/pkg-config
Target /usr/local/bin/pkg-config
already exists. You may want to remove it:
rm '/usr/local/bin/pkg-config'
To force the link and overwrite all conflicting files:
brew link --overwrite pkg-config
To list all files that would be deleted:
brew link --overwrite --dry-run pkg-config
二、移除
移除rm /usr/local/bin/pkg-config
繼續(xù)執(zhí)行brew link pkg-config
返回結(jié)果Could not symlink share/aclocal/pkg.m4
Target /usr/local/share/aclocal/pkg.m4
already exists. You may want to remove it:
rm '/usr/local/share/aclocal/pkg.m4'
To force the link and overwrite all conflicting files:
brew link --overwrite pkg-config
To list all files that would be deleted:
brew link --overwrite --dry-run pkg-config
三、繼續(xù)移除
移除 rm /usr/local/share/aclocal/pkg.m4?
繼續(xù)執(zhí)行brew link pkg-config
返回結(jié)果Linking /usr/local/Cellar/pkg-config/0.29.1_2...
Error: Could not symlink share/doc/pkg-config/pkg-config-guide.html
Target /usr/local/share/doc/pkg-config/pkg-config-guide.html
already exists. You may want to remove it:
rm '/usr/local/share/doc/pkg-config/pkg-config-guide.html'
To force the link and overwrite all conflicting files:
brew link --overwrite pkg-config
To list all files that would be deleted:
brew link --overwrite --dry-run pkg-config
四、依然移除
移除 rm /usr/local/share/doc/pkg-config/pkg-config-guide.html
會要求輸入密碼
繼續(xù)執(zhí)行brew link pkg-config
返回結(jié)果Linking /usr/local/Cellar/pkg-config/0.29.1_2...
Error: Could not symlink share/doc/pkg-config/pkg-config-guide.html
/usr/local/share/doc/pkg-config is not writable.
五、創(chuàng)建pkg-config
在/usr/local/share/doc/創(chuàng)建pkg-config
繼續(xù)執(zhí)行brew link pkg-config
返回結(jié)果Linking /usr/local/Cellar/pkg-config/0.29.1_2...
Error: Could not symlink share/man/man1/pkg-config.1
Target /usr/local/share/man/man1/pkg-config.1
already exists. You may want to remove it:
rm '/usr/local/share/man/man1/pkg-config.1'
To force the link and overwrite all conflicting files:
brew link --overwrite pkg-config
To list all files that would be deleted:
brew link --overwrite --dry-run pkg-config
六宙枷、刪刪刪
移除 rm /usr/local/share/man/man1/pkg-config.1
會要求輸入密碼
繼續(xù)執(zhí)行brew link pkg-config
執(zhí)行結(jié)果Linking /usr/local/Cellar/pkg-config/0.29.1_2... 4 symlinks created
終于成功啦~~~~