Search code examples
rdatabricksterra

error in installing r terra package on databricks


I am trying to install an R package terra on databricks. But I get following error. I am not able to understand the error and how to fix it. enter image description here


Solution

  • Most probably the problem is that required libraries are missing. The project's README says that you need to install following libraries: libgdal-dev libgeos-dev libproj-dev. You can achieve this with following init script attached to your cluster (not tested):

    #!/bin/bash
    
    sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
    sudo apt-get update
    sudo apt-get install -y libgdal-dev libgeos-dev libproj-dev