3

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
  • 3,012
  • Just to confirm, but you are trying to install mssql and not mysql right? Also, if it is mssql, are you trying to install a client or are you trying to install server tools? – TheOdd Nov 18 '16 at 18:47
  • @Owen mssql-tools is the tools that provide sqlcmd. They're after the MSSQL tools. – Thomas Ward Nov 18 '16 at 19:36

1 Answers1

4

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

  1. Enter Superuser Mode

    sudo su

  2. Import the public repository GPG keys:

    curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

  3. Register the Microsoft Ubuntu repository:

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

  4. Exit superuser mode:

    exit

  5. Update the sources list and run the installation command:

    sudo apt-get update
    sudo apt-get install mssql-tools
Thomas Ward
  • 74,764