MSSQL : SQLCMD not found
You need to make sure you set up the MSSQL repository for the mssql-tools
and then install it. None of the MSSQL stuff is available out of the box.
Caveats:
16.04 is the only available version of Ubuntu supported at the time of this post.
Since this post, only LTSes are guaranteed to work, interim releases may work but LTSes are preferred environments.
(Source)
NOTE FROM THOMAS WARD: These are from Microsoft, I don't necessarily endorse all their recommended procedures.
Install tools on Ubuntu
Enter Superuser Mode
sudo su
Import the public repository GPG keys:
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
Register the Microsoft Ubuntu repository:
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/msprod.list
Exit superuser mode:
exit
Update the sources list and run the installation command:
sudo apt-get update sudo apt-get install mssql-tools
Related videos on Youtube
chandra sekhar madepalli
Updated on September 18, 2022Comments
-
chandra sekhar madepalli almost 2 years
I am unable to install
mssql-tools
sudo apt-get install mssql-tools
It gives the error:
E: unable to locate
How can I fix this?
-
TheOdd over 7 yearsJust to confirm, but you are trying to install
mssql
and notmysql
right? Also, if it ismssql
, are you trying to install a client or are you trying to install server tools? -
Thomas Ward over 7 years@Owen
mssql-tools
is the tools that providesqlcmd
. They're after the MSSQL tools.
-