Issue
I'm trying to install mssql driver on Ubuntu 16.04 using this rel="noreferrer">guidance. When I get into the step :
sudo ACCEPT_EULA=Y apt-get install msodbcsql
I got an error : Unable to locate package msodbcsql What step did I miss?
Thanks in advance.
Solution
It seems, because, according to that url, right command for Ubuntu is:
sudo ACCEPT_EULA=Y apt-get install msodbcsql17
full script for 16.04:
sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
#Download appropriate package for the OS version
#Choose only ONE of the following, corresponding to your OS version
#Ubuntu 16.04
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
exit
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql17
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y apt-get install mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
sudo apt-get install unixodbc-dev
Update (13 Apr 18)
Consider to check that Microsoft repository properly registered by running:
sudo apt-get update
As a result you should see a line similar to a "Get:30 http packages.microsoft.com/ .."
My vm example:
Get:29 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3,208 B]
Get:30 https://packages.microsoft.com/ubuntu/16.04/prod xenial/main amd64 Packages [31.7 kB]
Fetched 12.9 MB in 5s (2,265 kB/s)
Answered By - Alexander Volok Answer Checked By - Clifford M. (WPSolving Volunteer)