3

I am trying to set up connection to sql server on laravel using Docker via Sail.

Here is how I am trying to get the msodbcdriver17 as listed in the installation guide https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15

&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/ubuntu/21.04/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update \
&& ACCEPT_EULA=Y apt-get install -y msodbcsql17 \
&& ACCEPT_EULA=Y apt-get install -y mssql-tools \
&& echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc \
&& source ~/.bashrc \

However, I am getting following error

E: Unable to locate package msodbcsql17

I have looked around for different solutions, but nothing seems to help. I also tried switching the Microsoft package URL to older version i.e. 20.04 and 18.04. But getting the same error.

I am on a MAC M1 and using docker-desktop v 3.6.0

Tushar
  • 1,166
  • 4
  • 14
  • 31
  • Based on Microsoft's documentation it is not compatible. https://learn.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-ver15#installing-on-ubuntu says "Ubuntu versions 16.04, 18.04, and 20.04 are supported.". Have you found another solution? – o15a3d4l11s2 Sep 16 '21 at 10:29

1 Answers1

0

The current docs speak of

sudo pecl install sqlsrv
sudo pecl install pdo_sqlsrv
online Thomas
  • 8,864
  • 6
  • 44
  • 85