%sh fails to install mdbtools locally
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 11:26 PM
Hi
I have a notebook that uses mdbtools:
%sh
sudo apt-get -y -S install mdbtoolsHowever, 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 requiredThis 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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 12:25 AM - edited 09-24-2024 12:27 AM
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
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