Centos7上编译安装PostgreSQL9.0报错FATAL: wrong number of index expressions怎么解决

44次阅读
没有评论

共计 1691 个字符,预计需要花费 5 分钟才能阅读完成。

行业资讯    
服务器    
Centos7 上编译安装 PostgreSQL9.0 报错 FATAL: wrong number of index expressions 怎么解决

这篇文章主要介绍了 Centos7 上编译安装 PostgreSQL9.0 报错 FATAL: wrong number of index expressions 怎么解决的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇 Centos7 上编译安装 PostgreSQL9.0 报错 FATAL: wrong number of index expressions 怎么解决文章都会有所收获,下面我们一起来看看吧。

报错信息:

-bash-4.2$ /usr/local/pg9.0/bin/initdb -D /usr/local/pg9.0/data/
The files belonging to this database system will be owned by user  postgres .
This user must also own the server process.
The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to  english .
fixing permissions on existing directory /usr/local/pg9.0/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
creating template1 database in /usr/local/pg9.0/data/base/1 ... ok
initializing pg_authid ... FATAL: wrong number of index expressions
STATEMENT: REVOKE ALL on pg_authid FROM public;
child process exited with exit code 1
initdb: removing contents of data directory  /usr/local/pg9.0/data

问题原因:

gcc 版本过高。高版本的 gcc 采用了更激进的循环上界分析推导算法。但这会导致一些旧的程序运行出错。

解决方案:

推荐的方法:升级 PostgreSQL 到更新的版本。

如果无法更换 PG 数据库版本和操作系统版本,则可以采取如下临时解决方案:
1. 在数据库编译安装进行 configure 操作时,添加参数 -Wno-aggressive-loop-optimizations 或 -fno-aggressive-loop-optimizations。
如:

./configure --prefix=/usr/local/pg9.0 CFLAGS= -Wno-aggressive-loop-optimizations 
make clean
make 
make install

我的环境 gcc 4.8.5

关于“Centos7 上编译安装 PostgreSQL9.0 报错 FATAL: wrong number of index expressions 怎么解决”这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对“Centos7 上编译安装 PostgreSQL9.0 报错 FATAL: wrong number of index expressions 怎么解决”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注丸趣 TV 行业资讯频道。

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-14发表,共计1691字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)