【发布时间】:2019-01-08 22:49:51
【问题描述】:
在 Mac (OSX 10.11.6) 上通过 Homebrew 安装 PostgreSQL 时出现以下错误:
Error: The `brew link` step did not complete successfully The formula
built, but is not symlinked into /usr/local
和
initdb: file "/usr/local/share/postgresql/postgres.bki" does not exist
This might mean you have a corrupted installation or identified the
wrong directory with the invocation option -L.
/postgresql 文件夹不存在。
不确定是否相关,但我已经通过 Homebrew 安装了 OpenSSL 1.0.2o_2 和 Readline 7.0.5。
有谁知道为什么会出现这个错误以及我该如何解决?
【问题讨论】:
-
在使用 Homebrew 安装 Postgres 时也遇到了一些问题。找到postgresapp.com 用于在 OSX 上管理不同的 PostgreSQL 版本
-
感谢您的提示,正在努力寻找解决方案。可能会尝试这样做!
-
你看过
brew doctor的输出了吗?也许它可以给你一个线索。另外,您能否展示一下您是如何通过 Homebrew 安装 PostgreSQL 的? -
目录
/usr/local/share/postgresql应该包含成功安装后 Homebrew 安装的相关文件的所有符号链接。所以,我想,问题是为什么在你的情况下没有创建这个目录和符号链接。我刚刚在我的机器上做了brew reinstall postgresql,它工作正常。您是否手动更改了/usr/local/share的权限? -
感谢另一个节点。你是对的,这是一个权限问题。递归 sudo chowning /user/local/share 文件夹就可以了。
标签: postgresql macos homebrew