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

来源:互联网 发布:七爷交友平台知乎 编辑:程序博客网 时间:2024/06/05 04:11

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

==> Pouring postgresql-9.6.3.yosemite.bottle.tar.gzError: The `brew link` step did not complete successfullyThe formula built, but is not symlinked into /usr/localCould 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/postgresLast 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 postgresqlLinking /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

阅读全文
0 0
原创粉丝点击