在debian服务器上安装pgadmin

我有官方网站的pgAdminIII-1.14源代码。

现在我正试图在Debian Squeeze机器上编译它。

起初我做了:

./configure 

我得到这个错误:

 configure: error: you must specify a valid PostgreSQL 8.4+ installation with --with-pgsql=DIR 

我不知道哪一个是它需要的目录,我尝试过:

 /usr/lib/postgresql/9.1/bin 

这是我有“psql”的目录,但它不是好的。

我该如何解决?

可能你必须设置--with-pgsql=/usr/lib/postgresql/9.1

你是如何安装postgresql服务器的? 使用存储库或从源?

另一方面,这个问题可能会在你缺lesspg_config的时候发生(其中的.configure正在寻找)

请执行which pg_config ,如果缺less – 安装额外的pacakges sudo apt-get install libpq-dev

如果没有帮助,请尝试将/usr/lib/postgresql/9.1/bin/.移动/复制/链接/usr/bin/pg_config /usr/lib/postgresql/9.1/bin/.

然后可能configure: error: Could not find your wxWidgets installation. You might need to use the --with-wx=DIR configure option configure: error: Could not find your wxWidgets installation. You might need to use the --with-wx=DIR configure option错误将会发生。

apt-get install libwxgtk2.8-dev libwxgtk2.8-dbg修复它

接下来是configure: error: Could not find your libxml2 installation. You might need to use the --with-libxml2=DIR configure option configure: error: Could not find your libxml2 installation. You might need to use the --with-libxml2=DIR configure option

修复 – apt-get install libxml2-dev

再次 – configure: error: Could not find your libxslt installation. You might need to use the --with-libxslt=DIR configure option configure: error: Could not find your libxslt installation. You might need to use the --with-libxslt=DIR configure option

修复 – apt-get install libxslt1-dev

之后,使失败

 gcc -DHAVE_CONFIG_H -I. -I.. -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -I../pgadmin/include -I/usr/include /postgresql -I/usr/include/postgresql/9.1/server -I/usr/include/postgresql -DSSL -DHAVE_CONNINFO_PARSE -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DEMBED_XRC -I/usr/include/libxml2 -I/usr/include/libxml2 -O2 -MT keywords.o -MD -MP -MF .deps/keywords.Tpo -c -o keywords.o `test -f './db/keywords.c' || echo './'`./db/keywords.c ./db/keywords.c:33:27: fatal error: parser/kwlist.h: Nie ma takiego pliku ani katalogu compilation terminated. make[3]: *** [keywords.o] Błąd 1 make[3]: Opuszczenie katalogu `/home/pkieszcz/pgadmin3-1.14.3/pgadmin' make[2]: *** [all] Błąd 2 make[2]: Opuszczenie katalogu `/home/pkieszcz/pgadmin3-1.14.3/pgadmin' make[1]: *** [all-recursive] Błąd 1 make[1]: Opuszczenie katalogu `/home/pkieszcz/pgadmin3-1.14.3' make: *** [all] Błąd 2 

创buildparsing器文件夹,并在这里wget这个文件 – http://www.markmcfadden.net/files/kwlist.h

最后 – 使安装进行得很顺利。

TL,DR;

 apt-get install libxslt1-dev libxml2-dev libwxgtk2.8-dev libwxgtk2.8-dbg libpq-dev cp /usr/bin/pg_config /usr/lib/postgresql/9.1/bin/. ./configure mkdir parser cd parser wget http://www.markmcfadden.net/files/kwlist.h make make install