使检查无法在Postgres 8.4.2中启动

时间:2014-02-07 15:29:09

标签: postgresql amazon-ec2 gnu-make postgresql-8.4

在尝试在我在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

即使我强制makemake check使用GNUmakefile,通过-f GNUmakefile,也会发生同样的错误。

请注意,我可以在家用计算机上运行回归套件。

有没有人知道为什么它不能在EC2实例上工作?

编辑:在我的家用机器上,我正在运行Ubuntu 12.04。 EC2实例正在运行13.10。两台机器都在运行版本3.81。

2 个答案:

答案 0 :(得分:2)

你必须搞砸了下载或结帐。你怀疑那里应该有一个src/test/regress/GNUmakefile。请尝试重新下载。

答案 1 :(得分:2)

这就是我的目录:

$ ls src/test/regress/*akefile
src/test/regress/GNUmakefile  src/test/regress/Makefile