[postgis-users] configure: error: could not find proj_api.h,but it did not work when I specify the directory of a PROJ.4
dw_qiuchunxiao at sina.com
dw_qiuchunxiao at sina.com
Wed Nov 21 02:04:05 PST 2018
Hello,
I installed postgresql 10.4, proj.4, gdal and geos in linux7.3,and I want to install postgis from source.
However,when I run the "./configure" command, I get this result:
[root at pgsrv11 postgis-2.4.4]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-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... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/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 how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-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 a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : 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... no
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 grep that handles long lines and -e... (cached) /usr/bin/grep
checking for cpp... /usr/bin/cpp
checking if gcc supports -Wall... yes
checking if gcc supports -Wmissing-prototypes... yes
checking if gcc supports -ffloat-store... yes
checking if gcc supports --exclude-libs... yes
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for bison... bison -y
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for vasprintf... yes
checking for asprintf... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking whether isfinite is declared... yes
checking whether isfinite is declared... yes
checking for perl... /usr/bin/perl
checking for xsltproc... /usr/bin/xsltproc
checking for convert... no
configure: WARNING: ImageMagick does not seem to be installed. Documentation cannot be built
checking for dblatex... no
configure: WARNING: dblatex is not installed so PDF documentation cannot be built
checking for xmllint... /usr/bin/xmllint
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 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... /usr/local/pgsql-10.4/bin/pg_config
checking PostgreSQL version... PostgreSQL 10.4
checking libpq-fe.h usability... yes
checking libpq-fe.h presence... yes
checking for libpq-fe.h... yes
checking for PQserverVersion in -lpq... yes
checking for xml2-config... /usr/bin/xml2-config
checking libxml/tree.h usability... yes
checking libxml/tree.h presence... yes
checking for libxml/tree.h... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
checking libxml/xpath.h usability... yes
checking libxml/xpath.h presence... yes
checking for libxml/xpath.h... yes
checking libxml/xpathInternals.h usability... yes
checking libxml/xpathInternals.h presence... yes
checking for libxml/xpathInternals.h... yes
checking for xmlInitParser in -lxml2... yes
checking for geos-config... /usr/local/geos/bin/geos-config
checking GEOS version... 3.8.0dev
checking geos_c.h usability... yes
checking geos_c.h presence... yes
checking for geos_c.h... yes
checking for initGEOS in -lgeos_c... yes
checking for sfcgal-config... no
checking whether make sets $(MAKE)... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... /bin/sh: build-aux/config.rpath: No such file or directory
done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: could not find proj_api.h - you may need to specify the directory of a PROJ.4 installation using --with-projdir
Then I run the "./configure --with-projdir=/usr/local/proj" ,but I get the same result.
......
checking for msgmerge... /usr/bin/msgmerge
checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... /bin/sh: build-aux/config.rpath: No such file or directory
done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
Using user-specified proj directory: /usr/local/proj
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: could not find proj_api.h - you may need to specify the directory of a PROJ.4 installation using --with-projdir
And I certainly installed proj4 before
[root at pgsrv11 postgis-2.4.4]# find / -name proj
/usr/local/proj
/usr/local/proj/include/proj
/usr/local/proj/bin/proj
/usr/local/proj/share/proj
/opt/soft/proj.4/include/proj
/opt/soft/proj.4/src/.libs/proj
/opt/soft/proj.4/src/proj
and the proj_api.h file is here.
[root at pgsrv11 postgis-2.4.4]# find / -name proj_api.h
/usr/local/proj/include/proj_api.h
/opt/soft/proj.4/src/proj_api.h
I installed proj.4 in this way,
[root at pgsrv11 soft]# git clone https://github.com/OSGeo/proj.4.git
[root at pgsrv11 soft]# cd proj.4/
[root at pgsrv11 proj.4]# ./autogen.sh
[root at pgsrv11 proj.4]# ./configure --prefix=/usr/local/proj
[root at pgsrv11 proj.4]# make
[root at pgsrv11 proj.4]# make install
In this the way I installed postgis
[root at pgsrv11 soft]# wget https://download.osgeo.org/postgis/source/postgis-2.5.1.tar.gz
[root at pgsrv11 soft]# tar -zxvf postgis-2.5.1.tar.gz
[root at pgsrv11 soft]# cd postgis-2.5.1
And I get the same result when I installed postgis-2.5.1.
How do I solve the problem! Please let me know ,thank you !
dw_qiuchunxiao at sina.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20181121/d33ab730/attachment.html>
More information about the postgis-users
mailing list