安装错误

install: cannot remove '/swapfile': Operation not permitted
fallocate: fallocate failed: Text file busy
mkswap: error: /swapfile is mounted; will not make swapspace
swapon: /swapfile: swapon failed: Device or resource busy
/swapfile       swap    swap    auto      0       0
vm.swappiness = 10
Failed to create swap: are you root? Are you running on real hardware, or a fully virtualized server

我在安装过程中遇到此问题,该如何解决?我不使用 vps,我使用的是 vds。

您从以下命令获得:

free
df -h

安装脚本检测到您的内存少于 2G,并且交换空间少于 2G,它正在尝试创建一个交换文件。根据源代码,它没有处理已存在交换文件的情况。您可能应该删除现有的交换文件然后重试。这可能就足够了:

swapoff /swapfile && rm /swapfile
free
3 个赞