dpkg: unrecoverable fatal error, aborting: fork failed: Cannot allocate memory
It means you do not have enough memory to execute the operation.
It means you do not have enough memory to execute the operation.
The fix is for memory error, if you are getting following error
E: Sub-process /usr/bin/dpkg returned an error code (1)
You should check this post.
Since it is a memory error, try to configure dpkg first.
Check the free and used physical memory in megabytes by following command.
Flush file system buffers by executing :
If you are still facing the same problem, follow this.
To free page cache:
To free dentries and i-nodes :
To free page cache, dentries and i-nodes :
$ sudo dpkg --configure -a
But if you are still getting the error.Check the free and used physical memory in megabytes by following command.
$ free -m
It displays the total amount of free and used physical memory and swap space in the system, as well as the buffers and cache consumed by the kernel.Flush file system buffers by executing :
$ sync
Now try again.If you are still facing the same problem, follow this.
To free page cache:
$ echo 1 > /proc/sys/vm/drop_caches
To free dentries and i-nodes :
$ echo 2 > /proc/sys/vm/drop_caches
To free page cache, dentries and i-nodes :
$ echo 3 > /proc/sys/vm/drop_caches
Now try again.Still the error is not fixed, you should check the RAM and SWAP space for your system / server. Assigning a bigger RAM / SWAP will solve the error.
Thank you. This was helpful
ReplyDeleteHelped greatly thank you for posting
ReplyDelete