安装psql遇到的连接问题 Could not symlink include/ecpg_config.h


1、brew install postgresql 之后有如下错误:

==> Pouring postgresql-9.6.3.yosemite.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink include/ecpg_config.h
/usr/local/include is not writable.

You can try again using:
brew link postgresql
==> Using the sandbox
==> /usr/local/Cellar/postgresql/9.6.3/bin/initdb /usr/local/var/postgres
Last 15 lines from /Users/langxw/Library/Logs/Homebrew/postgresql/post_install.01.initdb:
2017-07-24 07:51:52 +0800


2、根据提示执行brew link postgresql之后


brew link --overwrite postgresql
Linking /usr/local/Cellar/postgresql/9.6.3...
Error: Could not symlink include/ecpg_config.h
/usr/local/include is not writable.

提示信息:缺少symlink ecpg_config.h  和缺少写权限。

3、解决方法:

1)添加权限/usr/local是添加些权限

2)添加link

/usr/local$ ln -s /usr/local/Cellar/postgresql/9.6.3/include/ecpg_config.h ecpg_config.h 

3)重新执行 brew link postgresql


注意!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。



 
粤ICP备14056181号  © 2014-2021 ITdaan.com