PostgreSQL从源安装-类型冲突的'copy_file_range'错误

时间:2018-08-14 09:30:03

标签: linux postgresql ubuntu postgresql-9.5

我当前正在尝试从源代码安装Postgresql的先前版本,但是在解压缩tarball并运行“ make”命令创建二进制文件后,我遇到了以下错误:

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

我可以在Postgres留言板上看到有关重命名copy_file_range()的讨论:https://www.postgresql.org/message-id/E1eWpqd-00067Q-2b%40gemulon.postgresql.org

有人知道要解决此问题需要采取什么步骤吗?我尝试安装的Postgres版本是9.5。

1 个答案:

答案 0 :(得分:0)

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

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