GDAL install

sudo apt-get install python-qgis

sudo apt-get build-dep python-gdal

$ cd gdal-2.1.0/
$ ./configure –prefix=/usr/
$ make
$ sudo make install
$ cd swig/python/
$ sudo python setup.py install

$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install python-gdal

sudo apt-get install libgdal-dev libgdal1h

sudo apt-get install libgdal-dev

export CPLUS_INCLUDE_PATH=/usr/include/gdal

export C_INCLUDE_PATH=/usr/include/gdal

pip install –no-install GDAL

pip download GDAL

python setup.py build_ext –include-dirs=/usr/include/gdal/

pip install –no-download GDAL

sudo python setup.py install –include-dirs=/usr/include/gdal

$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install python-gdal

sudo apt-get install libgdal-dev libgdal1h

pip install –global-option=build_ext –global-option=”-I/usr/include/gdal” GDAL==gdal-config --version

export CPLUS_INCLUDE_PATH=/usr/include/gdal

export C_INCLUDE_PATH=/usr/include/gdal

gdal-config –version

sudo apt-get install libgdal-dev

pip install pygdal==1.10.1

pip freeze|grep pygdal

pip wheel pygdal==1.10.1.0

ls wheelhouse

pip install pygdal==1.10.1.0 -f wheelhouse

export CPLUS_INCLUDE_PATH=/usr/include/gdal

sudo apt-get install libgdal-dev

Set up pip and/or virtualenv stuff

Now install Python binding for GDAL

export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip3 install GDAL=1.10.0

pip install –no-install GDAL

python setup.py build_ext –include-dirs=/usr/include/gdal
pip install –no-download GDAL

sudo apt-get install libgdal-dev libgdal1h libgdal1-dev
Set the compiler flags :
export CFLAGS=$(gdal-config –cflags)
Install the version corresponding to the system libraries (at the time of writing Ubuntu Trusty is using the 1.10 headers) :
pip install GDAL==1.10.0

sudo mkdir postgis-build

cd postgis-build


then put the script below in a shell script file

sudo nano build.sh

make it executable and run it

sudo chmod a+x build.sh

sudo wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2
sudo tar xfj geos-3.4.2.tar.bz2
cd geos-3.4.2
sudo ./configure
sudo make
sudo make install
cd ..
sudo wget http://download.osgeo.org/postgis/source/postgis-2.1.3.tar.gz
sudo tar xfz postgis-2.1.3.tar.gz
cd postgis-2.1.3
sudo ./configure
sudo make
sudo make install
sudo ldconfig
sudo make comments-install
cd ..
sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/shp2pgsql
sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/pgsql2shp
sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/raster2pgsql

UbuntuGIS package:

sudo apt-add-repository ppa:ubuntugis/ppa
sudo apt-get update

#or for bleeding edge:
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update


文章作者: 物探网
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 物探网 !
 上一篇
解决error while loading shared libraries:*.so: cannot open shared object file 解决error while loading shared libraries:*.so: cannot open shared object file
报错:error while loading shared libraries: *.so: cannot open shared object file: No such file or directory 解决方法如下:1.编辑
2016-12-05 物探网
下一篇 
Python Matplotlib 设置x/y坐标轴刻度 Python Matplotlib 设置x/y坐标轴刻度
刻度设置参考文档:xticks 命令yticks 命令以xticks为例: matplotlib.pyplot.xticks(args, *kwargs) 获取或者设置当前刻度位置和文本的 x-limits: return locs, la
2016-11-05 物探网
  目录