You must `brew link pkg-config` before openssl can be installed

一、执行brew link pkg-config

返回结果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

继续执行brew link pkg-config

返回结果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

三、继续移除

移除 rm /usr/local/share/aclocal/pkg.m4 

继续执行brew link pkg-config

返回结果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

会要求输入密码

继续执行brew link pkg-config

返回结果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.

五、创建pkg-config

在/usr/local/share/doc/创建pkg-config

继续执行brew link pkg-config

返回结果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

会要求输入密码

继续执行brew link pkg-config

执行结果Linking /usr/local/Cellar/pkg-config/0.29.1_2... 4 symlinks created

终于成功啦~~~~

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容