在macosx上安装pgroonga(使用Postgres.app) [英] Installing pgroonga on macosx (with Postgres.app)

查看:133
本文介绍了在macosx上安装pgroonga(使用Postgres.app)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是按照此处的说明安装pgroonga插件适用于Postgres,但当我执行此步骤时:

%psql -d pgroonga_test-命令'CREATE EXTENSION pgroonga;'

我收到以下错误:

错误:无法打开扩展控制文件"/Applications/Postgres.app/Contents/Versions/9.6/share/postgresql/extension/pgroonga.control":没有此类文件或目录

我认为自从我使用brew安装了应用程序和pgroonga的Postgres以来,它的位置是错误的.我还尝试从源代码构建 pgroonga 并完全重新安装 Postgres.似乎什么都没用.

如果有人能指出我正确的方向,将不胜感激.在此先感谢您帮助新手!

解决方案

如果新安装了PostgreSQL,请不要忘记启动PostgreSQL

  $ brew服务启动PostgreSQL 

对于使用 Homebrew 的PostgreSQL安装,有 postgresapp .我的 postgresapp 位置是/Applications/Postgres.app/Contents/Versions/xxx/.

然后我由Homebrew安装了PGroonga: $ brew install pgroonga .我的PGroonga目录为/usr/local/Cellar/pgroonga/xxx .

我手动将pgroonga lib放在 postgresapp 扩展文件夹中.我复制所有文件如下

  1. /usr/local/Cellar/pgroonga/xxx/share/postgresql->/Applications/Postgres.app/Contents/Versions/xxx/share/postgresql

  2. /usr/local/Cellar/pgroonga/xxx/lib->/Applications/Postgres.app/Contents/Versions/xxx/lib/postgresql

重新启动 postgresapp .现在,可以使用 pgadmin4 GUI将pgroonga扩展名安装到数据库中.

I'm just following the instructions here for installing the pgroonga add-on for Postgres but when I get to this step:

% psql -d pgroonga_test --command 'CREATE EXTENSION pgroonga;'

I get the following error:

ERROR: could not open extension control file "/Applications/Postgres.app/Contents/Versions/9.6/share/postgresql/extension/pgroonga.control": No such file or directory

I assume it's looking in the wrong location since I installed Postgres with the app and pgroonga using brew. I also tried building pgroonga from source and completely re-installing Postgres. Nothing seems to work.

If anyone could point me into the right direction it would be greatly appreciated. And thanks in advance for helping out a newb!

解决方案

If PostgreSQL is newly installed, don't forget to start PostgreSQL

$ brew services start postgresql

For PostgreSQL installation with Homebrew, there is a good post.

In my case, I installed postgresapp. My postgresapp location is /Applications/Postgres.app/Contents/Versions/xxx/.

And I installed PGroonga by Homebrew:$ brew install pgroonga. My PGroonga directory is /usr/local/Cellar/pgroonga/xxx.

I manually put pgroonga lib in postgresapp extensions folder. I copy all files as following

  1. /usr/local/Cellar/pgroonga/xxx/share/postgresql -> /Applications/Postgres.app/Contents/Versions/xxx/share/postgresql

  2. /usr/local/Cellar/pgroonga/xxx/lib -> /Applications/Postgres.app/Contents/Versions/xxx/lib/postgresql

Restart postgresapp. Now ready to install pgroonga extension into the database with pgadmin4 GUI.

这篇关于在macosx上安装pgroonga(使用Postgres.app)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆