加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

macos – PostgreSQL的问题

发布时间:2020-12-13 16:00:38 所属栏目:百科 来源:网络整理
导读:我正在尝试将pg_trgm模块加载到PostgreSQL,但出了点问题: $psql -d simko_development -f /usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sqlSETpsql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:9: ERROR: could not acces
我正在尝试将pg_trgm模块加载到PostgreSQL,但出了点问题:

$psql -d simko_development -f /usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql
SET
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:9: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:14: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:19: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:24: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:29: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:38: ERROR:  function similarity_op(text,text) does not exist
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:44: NOTICE:  type "gtrgm" is not yet defined
DETAIL:  Creating a shell type definition.
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:44: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:49: ERROR:  type gtrgm does not exist
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:55: ERROR:  function gtrgm_in(cstring) does not exist
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:61: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:66: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:71: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:76: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:81: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:86: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:91: ERROR:  type gtrgm does not exist
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:105: ERROR:  operator does not exist: text % text
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:111: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:116: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:121: ERROR:  could not access file "$libdir/pg_trgm": No such file or directory
psql:/usr/local/Cellar/postgresql/9.0.2/share/contrib/pg_trgm.sql:132: ERROR:  operator does not exist: text % text

> Mac OS X 10.6.6
> PostgreSQL 9.0.2(通过Homebrew确定)

更多信息:

$pg_config --sharedir
/usr/local/Cellar/postgresql/9.0.2/share

解决方法

无法帮助您使用macos,但在debian-linux安装中经常出现相同的问题.解决方案非常简单:所需的库位于一个名为postgresql-contrib的独立包中,该包应另外安装到主postgresql包中.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读