error with msodbc installation on docker

Huhn, Alexander 95 Reputation points
2023-02-14T16:39:23.99+00:00

I had a container where I installed msodbc successfully

2023-02-11T19:37:57.4354185Z Step 26/48 : RUN sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17
2023-02-11T19:37:57.4581744Z  ---> Running in 4a4103163268
2023-02-11T19:37:58.7290566Z Reading package lists...
2023-02-11T19:37:58.9192709Z Building dependency tree...
2023-02-11T19:37:58.9198211Z Reading state information...
2023-02-11T19:37:59.0809251Z The following additional packages will be installed:
2023-02-11T19:37:59.0810747Z   odbcinst unixodbc
2023-02-11T19:37:59.1386647Z The following NEW packages will be installed:
2023-02-11T19:37:59.1387518Z   msodbcsql17 odbcinst unixodbc
2023-02-11T19:37:59.1701331Z 0 upgraded, 3 newly installed, 0 to remove and 9 not upgraded.
2023-02-11T19:37:59.1702280Z Need to get 781 kB of archives.
2023-02-11T19:37:59.1703277Z After this operation, 164 kB of additional disk space will be used.
2023-02-11T19:37:59.1704324Z Get:1 http://archive.ubuntu.com/ubuntu jammy/universe amd64 odbcinst amd64 2.3.9-5 [10.0 kB]
2023-02-11T19:37:59.1755448Z Get:2 http://archive.ubuntu.com/ubuntu jammy/universe amd64 unixodbc amd64 2.3.9-5 [26.8 kB]
2023-02-11T19:37:59.2515376Z Get:3 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 msodbcsql17 amd64 17.10.2.1-1 [745 kB]
2023-02-11T19:37:59.5305134Z debconf: delaying package configuration, since apt-utils is not installed
2023-02-11T19:37:59.5643111Z Fetched 781 kB in 0s (4,644 kB/s)
2023-02-11T19:37:59.5877856Z Selecting previously unselected package odbcinst.
2023-02-11T19:37:59.5980771Z (Reading database ... 
2023-02-11T19:37:59.5982730Z (Reading database ... 5%
2023-02-11T19:37:59.5984208Z (Reading database ... 10%
2023-02-11T19:37:59.5985015Z (Reading database ... 15%
2023-02-11T19:37:59.5985666Z (Reading database ... 20%
2023-02-11T19:37:59.5986961Z (Reading database ... 25%
2023-02-11T19:37:59.5987600Z (Reading database ... 30%
2023-02-11T19:37:59.5988115Z (Reading database ... 35%
2023-02-11T19:37:59.5988607Z (Reading database ... 40%
2023-02-11T19:37:59.5989105Z (Reading database ... 45%
2023-02-11T19:37:59.5989577Z (Reading database ... 50%
2023-02-11T19:37:59.5990064Z (Reading database ... 55%
2023-02-11T19:37:59.6033063Z (Reading database ... 60%
2023-02-11T19:37:59.6064217Z (Reading database ... 65%
2023-02-11T19:37:59.6082834Z (Reading database ... 70%
2023-02-11T19:37:59.6110601Z (Reading database ... 75%
2023-02-11T19:37:59.6195444Z (Reading database ... 80%
2023-02-11T19:37:59.6237561Z (Reading database ... 85%
2023-02-11T19:37:59.6271852Z (Reading database ... 90%
2023-02-11T19:37:59.6295395Z (Reading database ... 95%
2023-02-11T19:37:59.6295782Z (Reading database ... 100%
2023-02-11T19:37:59.6296217Z (Reading database ... 64137 files and directories currently installed.)
2023-02-11T19:37:59.6312515Z Preparing to unpack .../odbcinst_2.3.9-5_amd64.deb ...
2023-02-11T19:37:59.6335557Z Unpacking odbcinst (2.3.9-5) ...
2023-02-11T19:37:59.6575371Z Selecting previously unselected package unixodbc.
2023-02-11T19:37:59.6628297Z Preparing to unpack .../unixodbc_2.3.9-5_amd64.deb ...
2023-02-11T19:37:59.6645776Z Unpacking unixodbc (2.3.9-5) ...
2023-02-11T19:37:59.6936338Z Selecting previously unselected package msodbcsql17.
2023-02-11T19:37:59.6983964Z Preparing to unpack .../msodbcsql17_17.10.2.1-1_amd64.deb ...
2023-02-11T19:37:59.7900514Z debconf: unable to initialize frontend: Dialog
2023-02-11T19:37:59.7901298Z debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
2023-02-11T19:37:59.7901875Z debconf: falling back to frontend: Readline
2023-02-11T19:37:59.8448156Z Unpacking msodbcsql17 (17.10.2.1-1) ...
2023-02-11T19:37:59.9600325Z Setting up odbcinst (2.3.9-5) ...
2023-02-11T19:37:59.9641147Z Setting up unixodbc (2.3.9-5) ...
2023-02-11T19:37:59.9694826Z Setting up msodbcsql17 (17.10.2.1-1) ...
2023-02-11T19:37:59.9786648Z odbcinst: Driver installed. Usage count increased to 1. 
2023-02-11T19:37:59.9787144Z     Target directory is /etc
2023-02-11T19:38:00.0084995Z W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
2023-02-11T19:38:00.0088695Z W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
2023-02-11T19:38:03.7513881Z Removing intermediate container 4a4103163268
2023-02-11T19:38:03.7514509Z  ---> 5a93ebb5f6af

and again the exact same command failed a few days later, where different packages were suggested to be installed and they could not be copied over

2023-02-14T11:24:12.9877442Z Step 27/50 : RUN sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17
2023-02-14T11:24:13.0005547Z  ---> Running in a7a3ed4e4230
2023-02-14T11:24:14.0556490Z Reading package lists...
2023-02-14T11:24:14.2368492Z Building dependency tree...
2023-02-14T11:24:14.2373749Z Reading state information...
2023-02-14T11:24:14.4506218Z The following additional packages will be installed:
2023-02-14T11:24:14.4512003Z   libodbc1 odbcinst odbcinst1debian2 unixodbc
2023-02-14T11:24:14.4547419Z Suggested packages:
2023-02-14T11:24:14.4548055Z   unixodbc-bin
2023-02-14T11:24:14.4818545Z The following NEW packages will be installed:
2023-02-14T11:24:14.4825198Z   libodbc1 msodbcsql17 odbcinst odbcinst1debian2 unixodbc
2023-02-14T11:24:14.5628173Z 0 upgraded, 5 newly installed, 0 to remove and 10 not upgraded.
2023-02-14T11:24:14.5629831Z Need to get 1,403 kB of archives.
2023-02-14T11:24:14.5630312Z After this operation, 1,059 kB of additional disk space will be used.
2023-02-14T11:24:14.5630974Z Get:1 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 libodbc1 amd64 2.3.11 [486 kB]
2023-02-14T11:24:14.6116793Z Get:2 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 odbcinst1debian2 amd64 2.3.11 [99.7 kB]
2023-02-14T11:24:14.6131997Z Get:3 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 odbcinst amd64 2.3.11 [21.3 kB]
2023-02-14T11:24:14.6137953Z Get:4 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 unixodbc amd64 2.3.11 [51.5 kB]
2023-02-14T11:24:14.6146273Z Get:5 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 msodbcsql17 amd64 17.10.2.1-1 [745 kB]
2023-02-14T11:24:14.8246420Z debconf: delaying package configuration, since apt-utils is not installed
2023-02-14T11:24:14.8685476Z Fetched 1,403 kB in 0s (10.5 MB/s)
2023-02-14T11:24:14.8975174Z Selecting previously unselected package libodbc1:amd64.
2023-02-14T11:24:14.9027991Z (Reading database ... 
2023-02-14T11:24:14.9028621Z (Reading database ... 5%
2023-02-14T11:24:14.9028984Z (Reading database ... 10%
2023-02-14T11:24:14.9029349Z (Reading database ... 15%
2023-02-14T11:24:14.9029712Z (Reading database ... 20%
2023-02-14T11:24:14.9036996Z (Reading database ... 25%
2023-02-14T11:24:14.9037427Z (Reading database ... 30%
2023-02-14T11:24:14.9037786Z (Reading database ... 35%
2023-02-14T11:24:14.9038144Z (Reading database ... 40%
2023-02-14T11:24:14.9038503Z (Reading database ... 45%
2023-02-14T11:24:14.9038860Z (Reading database ... 50%
2023-02-14T11:24:14.9039200Z (Reading database ... 55%
2023-02-14T11:24:14.9069635Z (Reading database ... 60%
2023-02-14T11:24:14.9091296Z (Reading database ... 65%
2023-02-14T11:24:14.9171951Z (Reading database ... 70%
2023-02-14T11:24:14.9209030Z (Reading database ... 75%
2023-02-14T11:24:14.9287303Z (Reading database ... 80%
2023-02-14T11:24:14.9321749Z (Reading database ... 85%
2023-02-14T11:24:14.9348514Z (Reading database ... 90%
2023-02-14T11:24:14.9369616Z (Reading database ... 95%
2023-02-14T11:24:14.9370004Z (Reading database ... 100%
2023-02-14T11:24:14.9370415Z (Reading database ... 64137 files and directories currently installed.)
2023-02-14T11:24:14.9398390Z Preparing to unpack .../libodbc1_2.3.11_amd64.deb ...
2023-02-14T11:24:14.9410458Z Unpacking libodbc1:amd64 (2.3.11) ...
2023-02-14T11:24:14.9446555Z dpkg: error processing archive /var/cache/apt/archives/libodbc1_2.3.11_amd64.deb (--unpack):
2023-02-14T11:24:14.9448446Z  trying to overwrite '/usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0', which is also in package libodbc2:amd64 2.3.9-5
2023-02-14T11:24:14.9453201Z dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
2023-02-14T11:24:14.9600783Z Selecting previously unselected package odbcinst1debian2:amd64.
2023-02-14T11:24:14.9657111Z Preparing to unpack .../odbcinst1debian2_2.3.11_amd64.deb ...
2023-02-14T11:24:14.9670061Z Unpacking odbcinst1debian2:amd64 (2.3.11) ...
2023-02-14T11:24:14.9702481Z dpkg: error processing archive /var/cache/apt/archives/odbcinst1debian2_2.3.11_amd64.deb (--unpack):
2023-02-14T11:24:14.9703365Z  trying to overwrite '/usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0', which is also in package libodbcinst2:amd64 2.3.9-5
2023-02-14T11:24:14.9712820Z dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
2023-02-14T11:24:14.9879447Z Selecting previously unselected package odbcinst.
2023-02-14T11:24:14.9879982Z Preparing to unpack .../odbcinst_2.3.11_amd64.deb ...
2023-02-14T11:24:14.9896590Z Unpacking odbcinst (2.3.11) ...
2023-02-14T11:24:14.9924471Z dpkg: error processing archive /var/cache/apt/archives/odbcinst_2.3.11_amd64.deb (--unpack):
2023-02-14T11:24:14.9925203Z  trying to overwrite '/etc/odbc.ini', which is also in package unixodbc-common 2.3.9-5
2023-02-14T11:24:15.0031636Z Selecting previously unselected package unixodbc.
2023-02-14T11:24:15.0086839Z Preparing to unpack .../unixodbc_2.3.11_amd64.deb ...
2023-02-14T11:24:15.0099782Z Unpacking unixodbc (2.3.11) ...
2023-02-14T11:24:15.0345718Z Selecting previously unselected package msodbcsql17.
2023-02-14T11:24:15.0408910Z Preparing to unpack .../msodbcsql17_17.10.2.1-1_amd64.deb ...
2023-02-14T11:24:15.1308373Z debconf: unable to initialize frontend: Dialog
2023-02-14T11:24:15.1308981Z debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
2023-02-14T11:24:15.1309532Z debconf: falling back to frontend: Readline
2023-02-14T11:24:15.1900197Z Unpacking msodbcsql17 (17.10.2.1-1) ...
2023-02-14T11:24:15.2861152Z Errors were encountered while processing:
2023-02-14T11:24:15.2911953Z  /var/cache/apt/archives/libodbc1_2.3.11_amd64.deb
2023-02-14T11:24:15.2913469Z  /var/cache/apt/archives/odbcinst1debian2_2.3.11_amd64.deb
2023-02-14T11:24:15.2913914Z  /var/cache/apt/archives/odbcinst_2.3.11_amd64.deb
2023-02-14T11:24:15.3017753Z W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
2023-02-14T11:24:15.3019957Z W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
2023-02-14T11:24:15.3021244Z E: Sub-process /usr/bin/dpkg returned an error code (1)
2023-02-14T11:24:15.4448720Z The command '/bin/sh -c sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17' returned a non-zero code: 100
2023-02-14T11:24:15.4513491Z ##[error]The command '/bin/sh -c sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17' returned a non-zero code: 100
2023-02-14T11:24:15.4573901Z ##[error]The process '/usr/bin/docker' failed with exit code 100
2023-02-14T11:24:15.4707763Z ##[section]Finishing: Build and push an image to container registry

The layout of my docker above has not changed.

I followed the installation instructions from https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16&tabs=ubuntu18-install%2Calpine17-install%2Cdebian8-install%2Credhat7-13-install%2Crhel7-offline

SQL Server on Azure Virtual Machines
Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
657 questions
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 34,041 Reputation points Microsoft Employee
    2023-02-14T21:27:05.5733333+00:00

    @Huhn, Alexander

    This issue was caused by a repo conflict that should now be fixed. Please retry and let me know if you still have issues.

    https://github.com/microsoft/linux-package-repositories/issues/39


    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments