I am installing msodbcsql17 in one of my docker container using below script. Docker container contains below image
python-ubuntu:3.9-ubuntu
RUN apt-get install -y unixodbc-dev>=2.3.7 unixodbc>=2.3.7
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | tee /etc/apt/sources.list.d/msprod.list
RUN apt-get update
RUN ACCEPT_EULA=Y apt-get install -y -f --allow-unauthenticated msodbcsql17
RUN ACCEPT_EULA=Y apt-get install -y --allow-unauthenticated mssql-tools
RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
ENV PATH "$PATH:/opt/mssql-tools/bin"
But I am facing below Error Logs. In January 2021 I was able to build the image successfully with the same Dockerfile but now we are facing the issue.
#23 1.929 The following NEW packages will be installed:
#23 1.930 msodbcsql17
#23 2.961 0 upgraded, 1 newly installed, 0 to remove and 16 not upgraded.
#23 2.961 Need to get 744 kB of archives.
#23 2.961 After this operation, 0 B of additional disk space will be used.
#23 2.961 Get:1 https://packages.microsoft.com/ubuntu/16.04/prod xenial/main amd64 msodbcsql17 amd64 17.8.1.1-1 [744 kB]
#23 4.114 debconf: delaying package configuration, since apt-utils is not installed
#23 4.149 Fetched 744 kB in 2s (370 kB/s)
#23 4.187 Selecting previously unselected package msodbcsql17.
(Reading database ... 16929 files and directories currently installed.)
#23 4.211 Preparing to unpack .../msodbcsql17_17.8.1.1-1_amd64.deb ...
#23 4.309 debconf: unable to initialize frontend: Dialog
#23 4.309 debconf: (TERM is not set, so the dialog frontend is not usable.)
#23 4.309 debconf: falling back to frontend: Readline
#23 4.309 debconf: unable to initialize frontend: Readline
#23 4.309 debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
#23 4.309 debconf: falling back to frontend: Teletype
#23 4.340 Unpacking msodbcsql17 (17.8.1.1-1) ...
#23 4.483 Setting up msodbcsql17 (17.8.1.1-1) ...
#23 4.496 dpkg: error processing package msodbcsql17 (--configure):
#23 4.496 installed msodbcsql17 package post-installation script subprocess returned error exit status 127
#23 4.510 Errors were encountered while processing:
#23 4.510 msodbcsql17
#23 4.518 E: Sub-process /usr/bin/dpkg returned an error code (1)
Please see if anything can be done to this problem as I am stuck with the issue since 7 days now