yum 命令总是显示“killed”

问题描述 投票:0回答:1

我想为 oracle linux 8 安装 mysql 软件包,但每个 yum 命令都以“killed”消息结束,甚至 yum list 也是如此。我尝试了以下方法:

  1. 截断所有日志,最终清空了约132M内存
  2. sudo yum clean all -> 删除 37 个文件
  3. 使用 sudo restart 并从 Oracle 云重新启动。

这是 free -h 命令的结果:

              total        used        free      shared  buff/cache   available
Mem:          680Mi       156Mi       423Mi       1.0Mi       101Mi       422Mi
Swap:         1.3Gi       400Mi       960Mi

出于某种原因,即使我尝试更新单个 tmux 包,它也会尝试安装 mysql 包并杀死自己:

[root@giga-machine log]# sudo yum update tmux
Ksplice for Oracle Linux 8 (x86_64)              13 MB/s | 2.7 MB     00:00
MySQL 5.7 Community Server                       24 MB/s | 3.0 MB     00:00
MySQL 8.0 for Oracle Linux 8 (x86_64)            15 MB/s | 3.0 MB     00:00
MySQL 8.0 Tools Community for Oracle Linux 8 (x 4.4 MB/s | 491 kB     00:00
MySQL 8.0 Connectors Community for Oracle Linux 329 kB/s |  30 kB     00:00
Oracle Software for OCI users on Oracle Linux 8  44 MB/s |  89 MB     00:02
Killed

下面是来自 /var/log/messages 的一些行,不知道它们是否可以帮助识别问题...:

Jul  7 17:59:55 giga-machine kernel: 148 pages in swap cache
Jul  7 17:59:55 giga-machine kernel: Swap cache stats: add 3919730, delete 3919549, find 1105109/1323288
Jul  7 17:59:55 giga-machine kernel: Free swap  = 0kB
Jul  7 17:59:55 giga-machine kernel: Total swap = 1393660kB
....
Jul  7 17:59:55 giga-machine kernel: Out of memory: Killed process 11693 (yum) total-vm:2092180kB, anon-rss:497592kB, file-rss:5768kB, shmem-rss:0kB, UID:0 pgtables:3620kB oom_score_adj:0
linux yum oraclelinux
1个回答
0
投票

今天我在使用 AlwaysFree 计算实例时遇到了同样的问题。

没有太多可以终止的事情。如果你付费的话,你可以增加内存。那么你就只剩下交换作为解决方案了。所以只要增加它就可以了。

swapon -s
swapoff -a
rm -f /.swapfile
fallocate -l 4G /.swapfile
chmod 600 /.swapfile
mkswap /.swapfile
swapon /.swapfile
swapon -s
© www.soinside.com 2019 - 2024. All rights reserved.