Installation via pip is supported, but will require .NET Core 2.0 dependencies to be installed prior.
The following chart shows the .NET Core 2.0 dependencies on different Linux distributions that are officially supported. The pip installation steps will outline commands to execute to download and install the dependencies.
OS | Dependencies |
---|---|
Ubuntu 14.04 | libunwind8, libicu52 |
Ubuntu 16.04 | libunwind8, libicu55 |
Ubuntu 17.04 | libunwind8, libicu57 |
Debian 8 (Jessie) | libunwind8, libicu52 |
Debian 9 (Stretch) | libunwind8, libicu57 |
CentOS 7 Oracle Linux 7 RHEL 7 OpenSUSE 42.2 Fedora 25 |
libunwind, libcurl, libicu |
Fedora 26 | libunwind, libicu |
mssql-cli needs Python to run, and works with Python 2.7 and 3.6.
mssql-cli is installed via pip. If you know pip, you can install mssql-cli using command
$ pip install mssql-cli
This command may need to run as sudo if you are installing to the system site packages. mssql-cli can be installed using the --user option, which does not require sudo.
$ pip install --user mssql-cli
If you are having installation issues, see the troubleshooting section for known issues and workarounds.
For supported operating system specific installations, see one of the following links:
Python is not installed by default on Windows. The latest Python installation package can be downloaded from here. When installing, select the 'Add Python to PATH' option. Python must be in the PATH environment variable.
Once Python is installed and in the PATH environment variable, open a command prompt, and install mssql-cli using the below command.
C:\> pip install mssql-cli
NOTE: If Python was installed into the "Program Files" directory, you may need to open the command prompt as an administrator for the above command to succeed.
On macOS, Python 2.7 is generally pre-installed. You may have to upgrade pip with the following easy_install commands.
$ sudo easy_install pip
$ sudo pip install --upgrade pip
$ sudo pip install mssql-cli --ignore-installed six
Installing on Linux using
pip
is no longer recommended. Please consult the Linux Installation Guide for installing mssql-cli withapt-get
oryum
.
On Linux, Python 2.7 is generally pre-installed. There are two prerequisite packages to run mssql-cli on Linux: libunwind and libicu.
$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ sudo yum -y install ./epel-release-latest-7.noarch.rpm
$ sudo yum -y install icu libunwind python-pip
$ sudo pip install mssql-cli
$ sudo yum -y install epel-release
$ sudo yum -y install libunwind libicu python-pip
$ sudo pip install mssql-cli
$ dnf upgrade
$ dnf install libunwind libicu python-pip
$ sudo pip install mssql-cli
$ sudo apt-get update & sudo apt-get install -y libunwind8 python-pip
$ sudo apt-get install -y libicu60 2> /dev/null || sudo apt-get install -y libicu57 2> /dev/null || sudo apt-get install -y libicu55 2> /dev/null || sudo apt-get install -y libicu55 2> /dev/null || sudo apt-get install -y libicu52
$ pip install --user mssql-cli
$ sudo zypper update
$ sudo zypper install libunwind libicu python-pip
$ sudo pip install mssql-cli
$ sudo zypper update
$ sudo zypper install libunwind libicu python-pip
$ sudo pip install mssql-cli