%sh fails to install mdbtools locally

KacperG
New Contributor III

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?

filipniziol
Esteemed Contributor

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