1

I'm trying to install the Microsoft ODBC Driver for SQL Server on my Ubuntu 16.04. I've already done

curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list

and

apt-get update

and it looks correct. Now I'm doing ACCEPT_EULA=Y apt-get install msodbcsql17 and I get this message:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package msodbcsql17

In general for last few hours I'm doing my best to connect from PHP to MSSQL Server but something is wrong and I'm running out of ideal what could be wrong. I check a lot of tutorials and in each of them it's working. I'm sure that I missed something, but I don't know what. Could you please help me with this? Thanks in Advance

modzel
  • 11
  • 3
  • Did you download the key first? [Installing the Microsoft ODBC Driver for SQL Server on Linux and macOS](https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15) – Thom A Dec 19 '19 at 21:33
  • Yes I did, just like in your link `curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -` I received 'OK'. – modzel Dec 19 '19 at 21:41
  • Sounds like you haven't updated the package listeing then. – Thom A Dec 19 '19 at 21:42
  • Do you mean `curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list`? If yes- I did. After this I did `apt-get update` and package msodbcsql17 is not located. – modzel Dec 19 '19 at 21:45
  • after `apt-get update` I had something like this: `Get:6 https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease [4003 B] Get:7 https://packages.microsoft.com/ubuntu/16.04/prod xenial/main amd64 Packages [111 kB] Fetched 224 kB in 2s (110 kB/s) Reading package lists... Done` – modzel Dec 19 '19 at 21:51
  • Any luck with `apt-cache search msodbc`? (if you haven't fixed this yet). Also consider taking this over to askubuntu.com, which is also a stackexchange site that is more appropriate for this question. – JNevill Dec 20 '19 at 13:58
  • Today I've installed msodbcsql on another Ubuntu based server and there was no problem. I have no idea why. It is highly possible that there was a mess in configuration of previous server. I took it over from the previous admin and I don't have 100% knowledge what was he doing with it. Anyway thank you for your the tips. – modzel Dec 22 '19 at 21:49

0 Answers0