cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

%sh fails to install mdbtools locally

KacperG
New Contributor

Hi

I have a notebook that uses mdbtools:

%sh
sudo apt-get -y -S install mdbtools

However, when I want to run it locally it returns error:

sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required

This error doesn't occur when it's ran on job cluster.

Any idea why and how to fix it, so I can debug it locally?

1 REPLY 1

filipniziol
New Contributor III

Hi @KacperG ,

Most likely the job is using different privileges than you.

In your command -S needs to be specified before apt-get. Have you tried running:

 

%sh
sudo -S apt-get -y install mdbtools

 

If it is just a typo, here are the options:

1.Try to run the command without sudo

filipniziol_0-1727162716235.png

2. Provide the password like that:

 

%sh
echo 'your_password' | sudo -S apt-get -y install mdbtools

 

 3. Install mdbtools locally from source:

 

%sh
wget https://github.com/mdbtools/mdbtools/releases/download/v0.9.3/mdbtools-0.9.3.tar.gz
tar -xzf mdbtools-0.9.3.tar.gz
cd mdbtools-0.9.3
./configure --prefix=$HOME/mdbtools
make
make install

 

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group