首页 > 解决方案 > PostgreSQL installing from source - conflicting types for 'copy_file_range' error

问题描述

I'm currently trying to install a previous version of Postgresql from the source code, however after unzipping the tarball and running the "make" command to create the binaries I run into this error:

copy_fetch.c:161:1: error: conflicting types for ‘copy_file_range’ copy_file_range(const char *path, off_t begin, off_t end, bool trunc) ^~~~~~~~~~~~~~~ In file included from copy_fetch.c:16:0: /usr/include/unistd.h:1110:9: note: previous declaration of ‘copy_file_range’ was here

I can see on the Postgres message boards there has been talk about renaming copy_file_range(): https://www.postgresql.org/message-id/E1eWpqd-00067Q-2b%40gemulon.postgresql.org

Does anyone know what steps are needed to resolve this issue? The version of Postgres I am trying to install is 9.5.

标签: linuxpostgresqlubuntupostgresql-9.5

解决方案


您应该使用已应用此修复程序的 9.5.11 或更高版本。

如果您坚持使用旧版本,则必须自己应用补丁


推荐阅读