当我试图在我在Amazon EC2上创建的新Ubuntu实例上运行PostgreSQL 8.4.2的回归套件时,遇到了一个奇怪的错误。
我可以成功配置PostgreSQL:

$ ./configure
[ Output not shown ]
$ tail -1 config.log
configure: exit 0

它构建得很好:
$ make
[ Ouput clipped ]
All of PostgreSQL successfully made. Ready to install.

但当我尝试运行回归套件时,会收到一个错误:
$ make check
[ Ouput clipped ]
make[2]: Entering directory `/home/ubuntu/stock/postgresql-8.4.2/src/test/regress'
You must use GNU make to use Postgres.  It may be installed
on your system with the name 'gmake'.

但是,我相信我正在运行GNU Make:
$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu

$ ls -l `which gmake`
lrwxrwxrwx 1 root root 13 Feb  6 17:41 /usr/bin/gmake -> /usr/bin/make

我看到在src/test/regress目录中有一个Makefile:
$ cat src/test/regress/Makefile
# The Postgres make files exploit features of GNU make that other makes
# do not have.  Because it is a common mistake for users to try to build
# Postgres with a different make, we have this make file that does nothing
# but tell the user to use GNU make.

# If the user were using GNU make now, this file would not get used because
# GNU make uses a make file named "GNUmakefile" in preference to "Makefile"
# if it exists.  Postgres is shipped with a "GNUmakefile".

all install clean check installcheck:
    @echo "You must use GNU make to use Postgres.  It may be installed"
    @echo "on your system with the name 'gmake'."

该Makefile中的注释表示该目录中应该有一个名为GNUmakefile的文件,但没有:
$ ls src/test/regress/*akefile
src/test/regress/Makefile

顶层目录中有一个GNUMakefile:
$ ls *akefile
GNUmakefile  Makefile

即使当我通过make强制make checkGNUmakefile使用-f GNUmakefile时,也会发生同样的错误。
注意,我可以在我的家用机上运行回归套件。
有人知道它为什么不在EC2实例上工作吗?
编辑:在我的家用电脑上,我正在运行Ubuntu 12.04。EC2实例正在运行13.10。两台机器都在运行make 3.81版本。

最佳答案

你一定是下载或结帐出错了。正如你所怀疑的,那里应该有一个src/test/regress/GNUmakefile。请再次尝试下载。

关于postgresql - 使检查无法在Postgres 8.4.2中启动,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21631612/

10-10 00:17