I have a docker and want to install odbc17 as per https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16&tabs=alpine18-install%2Calpine17-install%2Cdebian8-install%2Credhat7-13-install%2Crhel7-offline
# Start with R/tidyverse
FROM rocker/verse
ENV DEBIAN_FRONTEND=noninteractive
#get python
RUN apt-get update && apt-get install -y --no-install-recommends build-essential libpq-dev python3.9 python3-pip python3-setuptools python3-dev
RUN pip3 install --upgrade pip
RUN apt -y install libpng-dev
# Install odbc
RUN sudo su
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list
RUN exit
RUN sudo apt-get update
RUN sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17
But while generating the image in Azure, I get the following error and it fails to generate:
2023-02-14T14:18:42.2710828Z (Reading database ... 64137 files and directories currently installed.)
2023-02-14T14:18:42.2734316Z Preparing to unpack .../libodbc1_2.3.11_amd64.deb ...
2023-02-14T14:18:42.2766375Z Unpacking libodbc1:amd64 (2.3.11) ...
2023-02-14T14:18:42.2807979Z dpkg: error processing archive /var/cache/apt/archives/libodbc1_2.3.11_amd64.deb (--unpack):
2023-02-14T14:18:42.2810054Z 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-14T14:18:42.2813123Z dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
2023-02-14T14:18:42.3056068Z Selecting previously unselected package odbcinst1debian2:amd64.
2023-02-14T14:18:42.3123163Z Preparing to unpack .../odbcinst1debian2_2.3.11_amd64.deb ...
2023-02-14T14:18:42.3152521Z Unpacking odbcinst1debian2:amd64 (2.3.11) ...
2023-02-14T14:18:42.3185590Z dpkg: error processing archive /var/cache/apt/archives/odbcinst1debian2_2.3.11_amd64.deb (--unpack):
2023-02-14T14:18:42.3186984Z 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-14T14:18:42.3198162Z dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
2023-02-14T14:18:42.3382063Z Selecting previously unselected package odbcinst.
2023-02-14T14:18:42.3472775Z Preparing to unpack .../odbcinst_2.3.11_amd64.deb ...
2023-02-14T14:18:42.3497953Z Unpacking odbcinst (2.3.11) ...
2023-02-14T14:18:42.3534885Z dpkg: error processing archive /var/cache/apt/archives/odbcinst_2.3.11_amd64.deb (--unpack):
2023-02-14T14:18:42.3536489Z trying to overwrite '/etc/odbc.ini', which is also in package unixodbc-common 2.3.9-5
2023-02-14T14:18:42.3681417Z Selecting previously unselected package unixodbc.
2023-02-14T14:18:42.3752176Z Preparing to unpack .../unixodbc_2.3.11_amd64.deb ...
2023-02-14T14:18:42.3771226Z Unpacking unixodbc (2.3.11) ...
2023-02-14T14:18:42.4193006Z Selecting previously unselected package msodbcsql17.
2023-02-14T14:18:42.4238023Z Preparing to unpack .../msodbcsql17_17.10.2.1-1_amd64.deb ...
2023-02-14T14:18:42.5528924Z debconf: unable to initialize frontend: Dialog
2023-02-14T14:18:42.5529605Z debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
2023-02-14T14:18:42.5530149Z debconf: falling back to frontend: Readline
2023-02-14T14:18:42.6125811Z Unpacking msodbcsql17 (17.10.2.1-1) ...
2023-02-14T14:18:42.7364967Z Errors were encountered while processing:
2023-02-14T14:18:42.7365575Z /var/cache/apt/archives/libodbc1_2.3.11_amd64.deb
2023-02-14T14:18:42.7366080Z /var/cache/apt/archives/odbcinst1debian2_2.3.11_amd64.deb
2023-02-14T14:18:42.7369636Z /var/cache/apt/archives/odbcinst_2.3.11_amd64.deb
2023-02-14T14:18:42.7495579Z [91mW: 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-14T14:18:42.7496884Z 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-14T14:18:42.7498150Z E: Sub-process /usr/bin/dpkg returned an error code (1)
2023-02-14T14:18:42.9082238Z [0mThe command '/bin/sh -c sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17' returned a non-zero code: 100
2023-02-14T14:18:42.9188464Z ##[error]The command '/bin/sh -c sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17' returned a non-zero code: 100
2023-02-14T14:18:42.9249998Z ##[error]The process '/usr/bin/docker' failed with exit code 100
2023-02-14T14:18:42.9322417Z ##[section]Finishing: Build and push an image to container registry
It used to work a week ago
Is there anything that can be done so it works again. Any advice appreciated.