Skip to content

买了个服务器, 1G 的内存,编译东西按说应该够了,安装相关的内容也没问题,但是编译了一阵就遇到 virtual memory exhausted: Cannot allocate memory 这个问题。 #72

@mic101

Description

@mic101

root账户下执行以下命令,开启swap:

dd if=/dev/zero of=/swap bs=1024 count=1M

Format the swap file:

mkswap /swap

Enable the swap file:

swapon /swap

Enable swap on boot:

echo "/swap swap swap sw 0 0" >> /etc/fstab

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions