Postgresql und Postgis unter Linuxmint

Hallo,

ich habe mich mal unter Linux Mint11 versucht. Das System läuft soweit eigentlich. Updates sind eingespielt, aber es steht in den Paketen nur Postgresql 8.4 zur Verfügung. Aktuell ist aber dei Version 9.0 bzw. 9.1
Welche Version habt ihr im Einsatz?

Ich habe auf der Website http://www.enterprisedb.com/products-services-training/pgdownload den oneclickinstaller geladen, da ich damit gute Erfahrungen unter Windows gemacht habe. Die bin Datei lässt sich jedoch nicht so recht ausführen. Ich bekomme nur die Abfrage mit welcher Anwendung ich die Datei öffnen möchte. (irgendwie wie bei Windows)

Das Paket läßt sich aber problemlos installieren. Nur gibts dazu kein Postgis, welches später erforderlich sein wird. (möchte ja eine OSM Datenbank reinwerfen) Bei Postgis gibt es aktuell die Version 1.5.3 als Paket bei Linuxmint ist die 1.5.1 bzw als Update heute 1.5.2
Also den Quelltext runtergeladen und entpackt um dann den Spaß zu übersetzen. ./configure läuft ja mit einigen Warnungen noch durch. Aber make und make install verweigern ihren Dienst:
osm@linux ~/Arbeitsfläche/postgis-1.5.3 $ make
make -C liblwgeom
make[1]: Entering directory /home/osm/Arbeitsfläche/postgis-1.5.3/liblwgeom' gcc -g -O2 -fno-common -DPIC -Wall -Wmissing-prototypes -c -o measures.o measures.c In file included from measures.h:16:0, from measures.c:18: liblwgeom.h:18:31: fatal error: ../postgis_config.h: No such file or directory compilation terminated. make[1]: *** [measures.o] Error 1 make[1]: Leaving directory /home/osm/Arbeitsfläche/postgis-1.5.3/liblwgeom’
make: *** [liblwgeom] Error 2

Jetzt stellt sich mir die Frage ob das Paket in der Version 1.5.2 reicht oder ob ich besser noch etwas anderes versuchen sollte.

Mmmh, “postgis_config.h” wird beim “./configure” erstellt:

configure: creating ./config.status

config.status: creating postgis_config.h

Grad mit Debian 6 kompiliert, ruckzuck fertig kompiliert.

Ciao,
Frank

ok ich sollte genauer lesen lernen. configure läuft offenbar doch nicht:


osm@linux ~/postgis-1.5.3 $ ./configure --with-pgconfig
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking if g++ supports -Wall... yes
checking if g++ supports -Wmissing-prototypes... yes
checking if g++ supports -ffloat-store... yes
checking for flex... no
checking for lex... no
checking for bison... no
checking for byacc... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking for convert... /usr/bin/convert
checking for xsltproc... /usr/bin/xsltproc
checking for dblatex... no
configure: WARNING: dblatex is not installed so PDF documentation cannot be built
configure: WARNING: could not locate Docbook stylesheets required to build the documentation
checking CUnit/CUnit.h usability... no
checking CUnit/CUnit.h presence... no
checking for CUnit/CUnit.h... no
configure: WARNING: could not locate CUnit required for liblwgeom unit tests
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for libiconv_open in -liconv... no
checking for iconv_open in -lc... yes
checking for iconvctl... no
checking for libiconvctl... no
configure: error: you must specify a parameter to --with-pgconfig, e.g. --with-pgconfig=/path/to/pg_config
osm@linux ~/postgis-1.5.3 $ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking if g++ supports -Wall... yes
checking if g++ supports -Wmissing-prototypes... yes
checking if g++ supports -ffloat-store... yes
checking for flex... no
checking for lex... no
checking for bison... no
checking for byacc... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking for convert... /usr/bin/convert
checking for xsltproc... /usr/bin/xsltproc
checking for dblatex... no
configure: WARNING: dblatex is not installed so PDF documentation cannot be built
configure: WARNING: could not locate Docbook stylesheets required to build the documentation
checking CUnit/CUnit.h usability... no
checking CUnit/CUnit.h presence... no
checking for CUnit/CUnit.h... no
configure: WARNING: could not locate CUnit required for liblwgeom unit tests
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for libiconv_open in -liconv... no
checking for iconv_open in -lc... yes
checking for iconvctl... no
checking for libiconvctl... no
checking for pg_config... no
configure: error: could not find pg_config within the current path. You may need to try re-running configure with a --with-pgconfig parameter.

Die Angabe des Parameters with-pgconfig allein reicht auch nicht aus. Er möchte dann schon gerne den vollständigen Pfad haben. Allerdings habe ich keine Idee wo ich diese Datei finden kann.

Moin moin,

bei mir liegt pg_config unter /usr/bin, somit
./configure --with-pgconfig=/usr/bin/pg_config

Es ist ein binary und ist im Paket “libpq-dev” enthalten, das könnte bei linuxmint vielleicht auch so sein.
Du verwendest aber, wenn ich Dich richtig verstanden habe, aber gar nicht das “linuxmit postgresql”, sondern das
von enterprisedb.com.

Kannst Dich ja mal auf die Suche mache, z. B. mittels
$ locate pg_config
oder
$ find / -name “pg_config”

Ciao,
Frank

Mhh wenn ich locate pg_config nehme, dann wird mir gesagt das ein betreffendes Paket nicht installiert ist. Das habe ich natürlich nachgeholt. Allerdings trägt es die Versionsnummer 8.4.8 kommt es dann nicht doch wieder zu Konflikten?
Ja ich habe nicht die Pakete aus den Ubuntupaketquellen installiert, da dort derzeit nur die 8.4 angeboten wird, aber die 9 schon schneller sein soll. Wenn du meinst man solle besser die 8.4 nehmen kann ich das auch machen.

Mmh, ich würd’ mal so sagen:
Bevor Du jetzt stundenlang herumcompilierst (und es vielleicht dann doch nicht geht) nimm einfach die Version die linuxmit schon mitbringt.
Kommt wohl auch darauf an, was Du machen möchtest: Zu Deinen Anwendungsfällen hast Du Dich noch nicht geäußert.
Unter Debian 6 schaut dann das Ende von “./configure”-Laufs dann so aus:

Ciao,
Frank