小心灵学院
欢迎您的光临

linux系统/run/systemd空间不足问题解决

linux系统在一些情况下会出现/run/systemd空间不足的问题,造成软件无法正常运行。今天入手了一个HiNet nat vps,128MB运存,安装软件提示/run/systemd空间不足的问题,于是网上找了一下解决办法。

报错详情

Setting up dnsmasq (2.76-5+deb9u2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → /lib/systemd/system/dnsmasq.service.
Failed to reload daemon: Refusing to reload, not enough space available on /run/systemd. Currently, 9.0M are free, but a safety buffer of 16.0M is enforced.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on dnsmasq.service: No such file or directory
Failed to reload daemon: Refusing to reload, not enough space available on /run/systemd. Currently, 9.0M are free, but a safety buffer of 16.0M is enforced.
Failed to reload daemon: Refusing to reload, not enough space available on /run/systemd. Currently, 9.0M are free, but a safety buffer of 16.0M is enforced.
Processing triggers for systemd (232-25+deb9u8) ...
Failed to reload daemon: Refusing to reload, not enough space available on /run/systemd. Currently, 9.0M are free, but a safety buffer of 16.0M is enforced.

df -h看下空间确实不足

Filesystem      Size  Used Avail Use% Mounted on
udev             47M     0   47M   0% /dev
tmpfs            12M  2.4M  9.1M  21% /run
/dev/vda1       1.8G  697M  948M  43% /
tmpfs            58M     0   58M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            58M     0   58M   0% /sys/fs/cgroup
tmpfs            12M     0   12M   0% /run/user/0

解决办法

根据提示是/run/systemd空间不足,我们可以想办法给它增加一点空间即可

echo "tmpfs /run tmpfs nosuid,noexec,size=18M,nr_inodes=4096 0 0" >> /etc/fstab

也就是在/etc/fstab末尾增加一行就行了。增加之后,保存,重启,问题就解决了。

赞(0)
未经许可不得转载:小心灵学院 » linux系统/run/systemd空间不足问题解决
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址