Virtual Server Compiling Error: ‚Cannot allocate memory‘

Sometimes when you compile certain things on a virtual server from source, you may receive the following error message: „virtual memory exhausted: Cannot allocate memory“ error. The following is a quick tip that at least worked for me.

List the amount of virtual memory allowed:


[root@vps /]# ulimit -a

To change it to a smaller value, enter this:

[root@vps /]# ulimit -v 60000

To reset it to the default settings, just type:

[root@vps /]# ulimit -v unlimited

Sometimes when you compile certain things on a virtual server from source, you may receive the following error message: „virtual memory exhausted: Cannot allocate memory“ error. The following is a quick tip that at least worked for me.

List the amount of virtual memory allowed:


[root@vps /]# ulimit -a

To change it to a smaller value, enter this:

[root@vps /]# ulimit -v 60000

To reset it to the default settings, just type:

[root@vps /]# ulimit -v unlimited

On Debian you want to use ulimit -m instead of ulimit -v. It will do the job for you.
[root@vps /]# ulimit -m 60000

Eine Antwort auf „Virtual Server Compiling Error: ‚Cannot allocate memory‘“

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.