Ubuntu: Getting error code(1) when installing MSSQL server in Ubuntu 16.04


Getting error code(1) in installing MSSQL Server in ubuntu 16.04

ERROR: This machine must have at least 3.25 gigabytes of memory to install Microsoft(R) SQL Server(R).

But I have 283.4 gigabytes free.


When Microsoft Structured Query Language (SQL) says it needs 3.25 GB of free memory it is talking about RAM (Random Access Memory) or volatile memory.

When you say you have 283.4 GB of memory free you are talking about non-volatile memory aka Hard Disk storage or Solid State Disk (SSD) storage.

Although they are both "memory" you are comparing apples to oranges which are both "fruit".

To see how much RAM you have available use the command free from the Terminal. ie:

$ free                total        used        free      shared  buff/cache   available  Mem:        8031732     1614708     4377704      750208     2039320     5357500  Swap:       8191996           0     8191996  

The first row "Mem:" refers to RAM. The second row "Swap" refers to hard disk swap space which we'll call "backup RAM" for lack of a better term.

The first column is your total installed RAM / Swap (in this case 8 GB each), the second how much is used and the third how much is "free". In this case 4 GB of RAM is free and 8 GB of Swap is free.

To increase your free RAM you can close your web browser, music players, videos, etc.


283.4GB is the amount of Hard Drive space you have.

The error 3.25 gigabytes of memory refers to your available RAM (Random Access Memory) capacity.

To find out how much RAM you have available, type this in your terminal:

$ free -m

This will give you a readout in Megabytes(MB), as to how much RAM you have.


This issue can also occur on Mac OSx if you don't update Docker available RAM. Usually Docker defaults to 2GB of RAM being allocated while this image requires at least 3.25 GB of RAM. Below you can find the corresponding menu in docker for updating RAM allocation:

enter image description here


If your are running the "microsoft/mssql-server-linux" Docker container, then the problem here may not be the memory that your computer has available, but the amount of memory that Docker reserves for the container. Default is 2GB. See Run the SQL Server Docker image on Linux, Mac, or Windows.


Try this:

sudo docker run --memory 4096m -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=password' -v 'host-directory:/var/opt/mssql' -p 1433:1433 -d microsoft/mssql-server-linux

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »