报错解决: fatal: Out of memory, malloc failed (tried to allocate 947912704 bytes)

使用云服务器git clone某个项目时,遇到如下问题:

fatal: Out of memory, malloc failed (tried to allocate 2000000000 bytes)

百度后找到如下解决方法:

sudo mkdir -p /opt/temp
sudo dd if=/dev/zero of=/opt/temp/swapfile bs=1M count=1024
sudo chmod 600 /opt/temp/swapfile
sudo mkswap /opt/temp/swapfile
sudo swapon /opt/temp/swapfile```
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容