我正在尝试在CentOS 7上编译GDAL 2.1.1,但我遇到了一些麻烦。
我的编译说明如下:
cd "/tmp"
tar xzf gdal-2.1.1.tar.gz
cd gdal-2.1.1
sed -i.bak 's/ char \\*type_name/ const char \\*type_name/g' /tmp/gdal-2.1.1/swig/php/gdal_wrap.cpp
unset ORACLE_HOME
export PY_INST_DIR=/usr/lib/python2.7/site-packages
export MAKEFLAGS="-j2"
./configure \
--prefix=/usr/local \
--with-threads \
--with-geos=/usr/bin/geos-config \
--with-libz \
--with-static-proj4=no \
--with-php \
--with-python=/bin/python \
--with-libtiff \
--with-geotiff=/usr/lib64/libgeotiff.so \
--with-png=/usr \
--with-gif=/usr \
--with-jpeg=/usr \
--with-curl \
--with-pg=/usr/bin/pg_config \
--with-ecw=/usr/local \
--with-libkml=/usr/local \
--with-libkml-lib=/usr/local/lib \
--with-libkml-inc=/usr/local/include/kml \
--with-mongocxx=/usr/local \
--with-boost-lib-path=/usr/local/lib \
--with-xml2=/usr/bin \
--with-oci \
--with-oci-include=/usr/include/oracle/11.2/client64 \
--with-oci-lib=/usr/lib/oracle/11.2/client64/lib \
--with-spatialite=/usr/local/lib \
--with-sqlite3=/usr/local/lib \
--with-libjson-c=internal
make && make install
编译时,我获得以下内容....
...
....
checking for XTIFFClientOpen in -lgeotiff... no
checking for XTIFFClientOpen in -lgeotiff... (cached) no
STDERR: /bin/sh: ./config.rpath: No such file or directory
configure: error: We require at least GeoTIFF 1.2.1. Consider using the one supplied with GDAL
GNUmakefile:2: GDALmake.opt: No such file or directory
make: *** No rule to make target `config.status', needed by `GDALmake.opt'. Stop.
---- End output of "bash" "/tmp/chef-script20170904-6904-1shld0w" ----
Ran "bash" "/tmp/chef-script20170904-6904-1shld0w" returned 2
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/gdal_install_csi/recipes/inst_gdal.rb
57: bash 'build-and-install-gdal' do
58: user "root"
59:
60: code <<-EOH
61: cd "/tmp"
62: tar xzf gdal-#{version}.tar.gz
63: cd gdal-#{version}
64:
65: sed -i.bak 's/ char \\*type_name/ const char \\*type_name/g' /tmp/gdal-#{version}/swig/php/gdal_wrap.cpp
66:
67: unset ORACLE_HOME
68: export PY_INST_DIR=/usr/lib/python2.7/site-packages
69: export MAKEFLAGS="-j2"
70:
71: ./configure \
72: --prefix=#{prefix_dir} \
73: --with-threads \
74: --with-geos=/usr/bin/geos-config \
75: --with-libz \
76: --with-static-proj4=no \
77: --with-php \
78: --with-python=/bin/python \
79: --with-libtiff \
80: --with-geotiff=/usr/lib64/libgeotiff.so \
81: --with-png=/usr \
82: --with-gif=/usr \
83: --with-jpeg=/usr \
84: --with-curl \
85: --with-pg=/usr/bin/pg_config \
86: --with-ecw=#{prefix_dir} \
87: --with-libkml=#{prefix_dir} \
88: --with-libkml-lib=#{prefix_dir}/lib \
89: --with-libkml-inc=#{prefix_dir}/include/kml \
90: --with-mongocxx=#{prefix_dir} \
91: --with-boost-lib-path=#{prefix_dir}/lib \
92: --with-xml2=/usr/bin \
93: --with-oci \
94: --with-oci-include=#{oracle_include} \
95: --with-oci-lib=#{oracle_lib} \
96: --with-spatialite=#{prefix_dir} \
97: --with-sqlite3=#{prefix_dir} \
98: --with-libjson-c=internal
99:
100: make && make install
101: EOH
102:
103: not_if { ::File.exists?(install_path) }
104: end
105:
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/gdal_install_csi/recipes/inst_gdal.rb:57:in `from_file'
bash("build-and-install-gdal") do
action [:run]
retries 0
retry_delay 2
default_guard_interpreter :default
command "build-and-install-gdal"
backup 5
returns 0
user "root"
code " cd \"/tmp\"\n tar xzf gdal-2.1.1.tar.gz\n cd gdal-2.1.1\n\n sed -i.bak 's/ char \\*type_name/ const char \\*type_name/g' /tmp/gdal-2.1.1/swig/php/gdal_wrap.cpp\n\n unset ORACLE_HOME\n export PY_INST_DIR=/usr/lib/python2.7/site-packages\n export MAKEFLAGS=\"-j2\"\n\n ./configure --prefix=/usr/local --with-threads --with-geos=/usr/bin/geos-config --with-libz --with-static-proj4=no --with-php --with-python=/bin/python --with-libtiff --with-geotiff=/usr/lib64/libgeotiff.so --with-png=/usr --with-gif=/usr --with-jpeg=/usr --with-curl --with-pg=/usr/bin/pg_config --with-ecw=/usr/local --with-libkml=/usr/local --with-libkml-lib=/usr/local/lib --with-libkml-inc=/usr/local/include/kml --with-mongocxx=/usr/local --with-boost-lib-path=/usr/local/lib --with-xml2=/usr/bin --with-oci --with-oci-include=/usr/include/oracle/11.2/client64 --with-oci-lib=/usr/lib/oracle/11.2/client64/lib --with-spatialite=/usr/local --with-sqlite3=/usr/local --with-libjson-c=internal\n\n make && make install\n"
interpreter "bash"
declared_type :bash
cookbook_name "gdal_install_csi"
recipe_name "inst_gdal"
not_if { #code block }
end
Platform:
---------
x86_64-linux
我试图在网上搜索错误
STDERR: /bin/sh: ./config.rpath: No such file or directory
configure: error: We require at least GeoTIFF 1.2.1. Consider using the one supplied with GDAL
但找不到有用的信息。 config.rpath怎么样?
请注意,我已经在我的系统上安装了GeoTIFF 1.4.1
是否有一些我不使用的家属?建议?
答案 0 :(得分:0)
您可以在此处找到指向不同操作系统的存储库的链接 https://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries