Mssql: Sqlcmd Not Found [Duplicate]

Mssql: Sqlcmd Not Found [Duplicate]

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?

2

1 Answer

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 | apt-key add -

  3. Register the Microsoft Ubuntu repository:

    curl > /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
David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.