Skip to content

Instantly share code, notes, and snippets.

@essoen
Forked from alfcrisci/install-gdal
Last active March 10, 2016 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save essoen/68176ba8fb45c70d3580 to your computer and use it in GitHub Desktop.
Save essoen/68176ba8fb45c70d3580 to your computer and use it in GitHub Desktop.
# Install subversion
sudo apt-get -y install subversion
# Install g++
sudo apt-get -y install g++
# Install Hierarchical Data Format library
# NOTE: This library is not necessarily needed, but was required
# in order for this to compile against a clean Ubuntu 12.04 LTS system.
# I didn't need it on a clean EC2 Ubuntu 12.10 instance, so
# I'm commenting it out here. Uncomment if you run into dependency troubles.
# sudo apt-get -y install libhdf4-alt-dev
# Get trunk of gdal
svn checkout https://svn.osgeo.org/gdal/trunk/gdal gdal
# Configure and make
cd gdal
./configure
sudo make install
# Modify .bashrc to export environment variable necessary for gdal to find library files
echo " " >> $HOME/.bashrc
echo "# GDAL environment variables" >> $HOME/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> $HOME/.bashrc
source $HOME/.bashrc
sudo ldconfig # fix problem with shared libraries unable to load
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment