bi_123
New Contributor III

The job cluster I am using is standard access mode and I store the .sh script in a UC volume and access it in the job yaml. I tried using this bash script but I get this error failed: Script exit status is non-zero. I can't find anything else explicitly stating the error. 
#!/bin/bash
# Download the Microsoft signing key
echo "Downloading Microsoft signing key..."
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
# Add the Microsoft repository for ODBC Driver 18
echo "Adding Microsoft repository..."
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
# Update the package index
echo "Updating package index again..."
sudo apt-get update
# Install the ODBC Driver 18
echo "Installing ODBC Driver 18..."
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18
# Install oDBC Driver Manager
# echo "Installing ODBC Driver manager ..."
sudo apt-get -y install unixodbc-dev
# Check if the driver is installed
echo "Checking installed driver..."
dpkg -L msodbcsql18
echo "ODBC Driver installation completed successfully."