cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Install system libraries on the cluster

leungi
New Contributor III

The `Library` option in cluster config allows installation of language-specific libraries - e.g., PyPi for Python, CRAN for R.

Some of these libraries - e.g., `sf` - require system libraries - e.g., `libudunits2-dev`, `libgdal-dev`.

How may one install system libraries in cluster permanently?

1 ACCEPTED SOLUTION

Accepted Solutions

feiyun0112
Contributor III
2 REPLIES 2

feiyun0112
Contributor III

leungi
New Contributor III

Thanks @feiyun0112.

For future self, steps:

1. Create a `.sh` file with the following:

#!/bin/bash

set -euxo pipefail

if [[ $DB_IS_DRIVER = "TRUE" ]]; then
  sudo apt-get -y update && apt-get install -y libudunits2-dev libgdal-dev libgeos-dev libproj-dev
fi

2. Add `.sh` file to cluster by editing its settings: Advanced Options > Init Scripts.

3. Relaunch cluster.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!