Trouble getting latest version of GDAL on ubuntu running R

前端 未结 1 821
青春惊慌失措
青春惊慌失措 2020-12-19 02:58

My Ubuntu machine has latest GDAL (2.2.1, released 2017/06/23). But R complains that I have gdalversion <2.0

configure: CC: gcc -std=gnu99 configure: CXX: g++ che

相关标签:
1条回答
  • 2020-12-19 03:43

    You may need to uninstall all traces of gdal then re-install it from the ubuntugis-unstable source. The following helped me solve a similar problem:

    sudo apt remove libgdal-dev
    sudo apt remove libproj-dev
    sudo apt remove gdal-bin
    sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
    

    Make sure a version >= 2.0 appears when you execute this line

    sudo apt-cache policy libgdal-dev
    

    If so, run

        sudo apt update
        sudo apt install libgdal-dev
    

    I could then successfully execute in R 3.4.2 in Ubuntu 14.04 ("Trusty Tahr"):

    install.packages('rgdal')
    
    0 讨论(0)
提交回复
热议问题