I try to install msodbcsql17 on AWS EC2 with CentOS/RedHat (Linux).
These are the steps, I have followed, from Microsoft (LINK):
sudo su
#Download
heres a snippet from my docker file that shows how to install on amazon linux:
RUN curl http://mirror.centos.org/centos/7/os/x86_64/Packages/unixODBC-2.3.1-14.el7.x86_64.rpm > /tmp/unixODBC-2.3.1-14.el7.x86_64.rpm
RUN yum -y install /tmp/unixODBC-2.3.1-14.el7.x86_64.rpm
RUN curl http://mirror.centos.org/centos/7/os/x86_64/Packages/unixODBC-devel-2.3.1-14.el7.x86_64.rpm > /tmp/unixODBC-devel-2.3.1-14.el7.x86_64.rpm
RUN yum -y install /tmp/unixODBC-devel-2.3.1-14.el7.x86_64.rpm
RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
RUN ACCEPT_EULA=Y yum -y install msodbcsql17
bonus if you want pyodbc:
RUN yum -y install gcc72-c++ \
&& yum -y install python36-devel \
&& yum -y install zip \
&& yum clean all
RUN python3.6 -m pip install --upgrade pip
RUN python3.6 -m pip install pyodbc
https://github.com/Microsoft/msphpsql/issues/496#issuecomment-569938591