【问题标题】:Unable to Install postgresql on my mac os x machine via homebrew无法通过自制软件在我的 mac os x 机器上安装 postgresql
【发布时间】:2018-06-25 18:32:17
【问题描述】:

我试图通过 mac os 上的终端安装 postgres。我使用自制软件来安装 postgres。 在安装过程中出现以下错误

"错误:brew link 步骤未成功完成 公式已构建,但未符号链接到 /usr/local 无法符号链接 share/man/man3/SPI_connect.3"

我也收到有关 initdb 的错误

"initdb: 文件"/usr/local/share/postgresql/postgres.bki" 不存在 这可能意味着您的安装已损坏或已识别 带有调用选项 -L 的错误目录。 警告:安装后步骤未成功完成 您可以使用brew postinstall postgresql“重试”

安装后我无法运行任何 postgres 命令。我非常感谢任何帮助,因为我是 postgres 的新手。请提供一点解释。

谢谢!

【问题讨论】:

    标签: macos postgresql terminal homebrew


    【解决方案1】:

    不确定这个解决方案是否是最好的,但到目前为止这是唯一一个。

    注意:我是在 macOS 环境中完成的

    我已经更改了不允许写入的目录。 (chown -R user/usr/local/lib/pkgconfig) /usr/local/lib/pkgconfig` (假设目录应该是我的 - 因为它在 /usr/local)

    我跑了 brew link postgres - 所以需要的链接在那里

    然后initdb /usr/local/var/postgres -E utf8 完美运行。

    【讨论】:

    • 对我来说,这是一个旧版本的 postgres,尚未取消链接。
    【解决方案2】:

    运行brew postinstall postgres --debug gives:

    Errno::EACCES: Permission denied @ dir_s_mkdir - /usr/local/var/postgres
    

    手动创建目录并设置正确的组:

    cd /usr/local/var
    sudo mkdir postgres
    sudo chown <user> postgres
    sudo chgrp admin postgres/
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-28
      • 1970-01-01
      • 2018-08-10
      • 2016-01-24
      • 2012-09-15
      • 2014-04-25
      相关资源
      最近更新 更多