引っ越し先のBlog サーバーでソフトがインストールできない問題を解決
| [bwc@blog ~]# dnf install -y php83-php-gd Killed |
なんか、引っ越し先のServerで一切のアプリがインストールできない謎現象が発生していたのですが。
ChatGPTに訊いたら即解決しました( ˘ω˘;)
| [5526706.104678] Out of memory: Killed process 1115753 (yum) total-vm:747316kB, anon-rss:664748kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:1440kB oom_score_adj:0 |
原因はメモリ不足
| [bwc@blog ~]# free -h total used free shared buff/cache available Mem: 1.7Gi 1.2Gi 590Mi 95Mi 239Mi 592Mi Swap: 0B 0B 0B |
Swapがありませんでした…なんでやねん。
| [bwc@blog ~]# fallocate -l 2G /swapfile [bwc@blog ~]# chmod 600 /swapfile [bwc@blog ~]# mkswap /swapfile Setting up swapspace version 1, size = 2 GiB (2147479552 bytes) no label, UUID=2393bb50-8e02-4648-bb33-b256d6831ffa [bwc@blog ~]# swapon /swapfile [bwc@blog ~]# echo ‘/swapfile swap swap defaults 0 0’ >> /etc/fstab [bwc@blog ~]# free -h total used free shared buff/cache available Mem: 1.7Gi 1.2Gi 559Mi 95Mi 246Mi 569Mi Swap: 2.0Gi 0B 2.0Gi |
これで解決。


Comments