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

HaD*_*Min 5 linux postgresql ubuntu postgresql-9.5

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

\n\n

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

\n\n

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

\n\n

有谁知道解决这个问题需要采取哪些步骤?我尝试安装的 Postgres 版本是 9.5。

\n

Lau*_*lbe 3

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

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