33

apt-get install python-gdal installs version 1.6.0 and this is already installed. I would like to install the 1.9.0 version.

Do I have to de-install 1.6.0 first and then compile manually or is there an apt-get package that I have missed?

Taras
35.8k5 gold badges77 silver badges152 bronze badges
asked Mar 14, 2012 at 17:28

5 Answers 5

61

Note: this is an answer for an older version of GDAL, and there are newer versions available (including current) that can be compiled similar to this answer. Just replace the version numbers in the commands below.


Build from source, with Python bindings:

sudo apt-get install build-essential python-all-dev
wget http://download.osgeo.org/gdal/2.0.0/gdal-2.0.0.tar.gz
tar xvfz gdal-2.0.0.tar.gz
cd gdal-2.0.0
./configure --with-python
make
sudo make install

In addition, some Linux distributions require the shared library cache to be updated after install:

sudo ldconfig
answered Mar 14, 2012 at 19:37
12
  • 2
    Thanks Mike is was very helpful, your description how on to build up gdal from the source. Commented Aug 8, 2012 at 21:32
  • @Rengifo Please upvote useful answers. You may leave comments but upvoting is even more important. Commented Aug 9, 2012 at 6:24
  • After 2 days unable to get gdal functioning in Ubuntu, finding this comment was /very/ helpful! One minor note though is that the rest of the GIS stack installs into /usr/local/bin and this seems to install into /usr/bin/ Commented Jan 8, 2013 at 7:14
  • 2
    For future users: the folder structure changed a little bit. In order to download the latest stable version, the wget command would look as follows: wget http://download.osgeo.org/gdal/1.11.1/gdal-1.11.1.tar.gz. Commented Jan 12, 2015 at 9:53
  • 1
    It's better to use checkinfo instead of make install, in case you ever wanted to uninstall it. Simple make uninstall didn't work for GDAL installed this way. Commented Aug 7, 2015 at 6:55
10

You can get 1.9 from Ubuntugis (see https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable).

See http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries for other sources of binaries.

Failing all else you can build 1.9 from the sources (http://trac.osgeo.org/gdal/wiki/BuildHints)

answered Mar 14, 2012 at 18:47
0
8

In case the question asked was still relevant, I managed to install Python-Gdal on Ubuntu 14.04 (Trusty) simply using:

apt-get install python-gdal

answered Aug 20, 2015 at 14:22
1
  • 2
    Your answer just made my day. I had been going by Mike's still good answer but I encountered some crazy error when installing on the third machine. But when running this it went smoothly. Thanks a lot! Commented Nov 7, 2016 at 20:22
5

You can get 1.9 from Ubuntugis (see https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable) as you're running Ubuntu 10.04 Lucid. 1.9 was built for Lucid for the OSGEO Live DVD and should be available for other Ubuntu versions soon (ish). Source: some email traffic on the UbuntuGIS mailing list.

answered Mar 15, 2012 at 1:51
0

In my case, I had to use with my Ubuntu:

 sudo apt-get install gdal-bin
answered Oct 3, 2023 at 7:22

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.