I'm encountering a problem executing my package at the moment

Earlier I've tried to execute this piece of code and is working correctly. I've also tried to run it several times and get the correct output. However, when executing the code today I'm getting this result

%sh
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql18 odbcinst
pip install --upgrade pip

pip install pyodbc

Result:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   983  100   983    0     0   6081      0 --:--:-- --:--:-- --:--:--  6105
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    89  100    89    0     0    772      0 --:--:-- --:--:-- --:--:--   773
deb [arch=amd64,armhf,arm64] https://packages.microsoft.com/ubuntu/20.04/prod focal main
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:2 https://repos.azul.com/zulu/deb stable InRelease
Get:3 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease [3,632 B]
Hit:4 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Fetched 114 kB in 1s (76.3 kB/s)
Reading package lists...
W: https://repos.azul.com/zulu/deb/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://packages.microsoft.com/ubuntu/20.04/prod/dists/focal/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Reading package lists...
Building dependency tree...
Reading state information...
msodbcsql18 is already the newest version (18.3.3.1-1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 odbcinst : Depends: odbcinst1debian2 (>= 2.3.11-1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Requirement already satisfied: pip in /local_disk0/.ephemeral_nfs/envs/pythonEnv-ca87f34a-e32c-410d-97d4-9cbe52da43b5/lib/python3.10/site-packages (24.0)
Requirement already satisfied: pyodbc in /databricks/python3/lib/python3.10/site-packages (4.0.32)

I've checked if the code has been changed; it hasn't. I've also tried using ChatGPT to correct the code, but I am still getting the same error.

The ideal output should be this:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   983  100   983    0     0  14042      0 --:--:-- --:--:-- --:--:-- 14042
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    89  100    89    0     0   2069      0 --:--:-- --:--:-- --:--:--  2119
deb [arch=amd64,armhf,arm64] https://packages.microsoft.com/ubuntu/20.04/prod focal main
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:4 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease [3,632 B]
Hit:5 https://repos.azul.com/zulu/deb stable InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,502 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [3,758 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [4,143 kB]
Get:10 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 Packages [286 kB]
Get:11 https://packages.microsoft.com/ubuntu/20.04/prod focal/main armhf Packages [20.4 kB]
Get:12 https://packages.microsoft.com/ubuntu/20.04/prod focal/main all Packages [2,714 B]
Get:13 https://packages.microsoft.com/ubuntu/20.04/prod focal/main arm64 Packages [59.5 kB]
Fetched 9,888 kB in 2s (4,203 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  msodbcsql18
0 upgraded, 1 newly installed, 0 to remove and 46 not upgraded.
Need to get 755 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 msodbcsql18 amd64 18.3.3.1-1 [755 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 755 kB in 0s (8,968 kB/s)
Selecting previously unselected package msodbcsql18.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 92231 files and directories currently installed.)
Preparing to unpack .../msodbcsql18_18.3.3.1-1_amd64.deb ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
Unpacking msodbcsql18 (18.3.3.1-1) ...
Setting up msodbcsql18 (18.3.3.1-1) ...
odbcinst: Driver installed. Usage count increased to 1. 
    Target directory is /etc
Requirement already satisfied: pyodbc in /databricks/python3/lib/python3.8/site-packages (5.1.0)
WARNING: You are using pip version 21.0.1; however, version 24.0 is available.
You should consider upgrading via the '/databricks/python3/bin/python -m pip install --upgrade pip' command.

Upvotes: 0

Views: 110

Answers (0)

Related Questions