下载安装编译 java gdal
wget http://download.osgeo.org/gdal/2.2.0/gdal-2.2.0.tar.gz
tar -zxf gdal-2.2.0.tar.gz
cd gdal-2.2.0
./configure —with-java=/apps/app/dk/jdk1.7.0_79/
make
编译时间很长
make install
cd swig/java/
vim java.opt
make
gdal文件夹中,里面有个swig文件夹,cd swig,里面有个python文件夹,cd python ,找到setup.cfg文件,双击编辑
python setup.py build
python setup.py install
如果遇到找不到libgdal 的问题
echo /usr/local/lib > /etc/ld.so.conf.d/local.conf
/sbin/ldconfig
如果遇到libc.so.6: version GLIBC_2.14 not found
wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz
wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.14.tar.gz
tar -xvf glibc-2.14.tar.gz
tar -xvf glibc-ports-2.14.tar.gz
mv glibc-ports-2.14 glibc-2.14/ports
mkdir glibc-2.14/build
cd glibc-2.14/build
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
make
make install
如果有LD_LIBRARY_PATH 报错
LD_LIBRARY_PATH=
结果为:
# ll /lib64/libc.so.6
/lib64/libc.so.6 -> /lib64/libc-2.14.so
则为正确