linux - 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.
解决方案
您应该使用已应用此修复程序的 9.5.11 或更高版本。
如果您坚持使用旧版本,则必须自己应用补丁。
推荐阅读
- java - 如果输入不是java中的数字,如何检查并显示错误消息
- mongodb - Mongo 错误:“$out 阶段需要一个字符串参数,但找到了对象(代码:14,代码名称:TypeMismatch)”
- javascript - 如何在#css中找到我们想要放置div的点的高度和宽度
- state-machine - 这是 Epsilon-NFA 正确的吗?
- javascript - 从 api 调用的 json 对象中删除重复值
- unity3d - 如何以 45/30/15 度曲线移动物体?
- wpf - 如何在 WPF 中同步两个滚动条
- r - 如何告诉 R 将函数应用于多个数据?
- java-8 - 欧盟结束夏令时将如何影响 Java8 时间 API
- docker - 如何在弹性搜索 docker 映像上运行 crontab 作业