yum hangs on OCI Linux (8.6)
If I run any yum
command on a free tier Linux 8 instance on Oracle Cloud Infrastructure (OCI), the commands hang indefinitely. For example:
yum install gcc-c++
yum update
There is no choice but to kill the process id for this process:
root@dev:/root> yum update
^C^C^C^CKilled
Solution Attempt #1
It seems that the yum clean all
command helped, as I got some progress:
root@dev:/root> yum clean all
32 files removed
root@dev:/root> yum install gcc-c++
Ksplice for Oracle Linux 8 (x86_64) 18 MB/s | 7.3 MB 00:00
MySQL 8.0 for Oracle Linux 8 (x86_64) 13 MB/s | 3.8 MB 00:00
MySQL 8.0 Tools Community for Oracle Linux 8 (x86_64) 4.5 MB/s | 636 kB 00:00
MySQL 8.0 Connectors Community for Oracle Linux 8 (x86_64) 176 kB/s | 30 kB 00:00
Oracle Software for OCI users on Oracle Linux 8 (x86_64) 35 MB/s | 136 MB 00:03
...but it eventually hangs again here...
Analysis
Under the yum repos folder in /etc/yum.repos.d
, there are multiple .repo
files. I was able to confirm that the hanging "Oracle Software for OCI users" update step was associated with the repo filename oci-included-ol8.repo
:
root@dev:/etc/yum.repos.d> ll
total 36
-rw-r--r--. 1 root root 382 Mar 8 03:51 hashicorp.repo
-rw-r--r--. 1 root root 495 May 4 2021 ksplice-ol8.repo
-rw-r--r--. 1 root root 759 Apr 12 2021 mysql-ol8.repo
-rw-r--r--. 1 root root 253 Mar 19 2021 oci-included-ol8.repo
-rw-r--r--. 1 root root 530 Aug 24 2022 oracle-epel-ol8.repo
-rw-r--r--. 1 root root 694 Aug 24 2022 oraclelinux-developer-ol8.repo
-rw-r--r--. 1 root root 3439 Aug 24 2022 oracle-linux-ol8.repo
-rw-r--r--. 1 root root 941 Jun 30 2022 uek-ol8.repo
-rw-r--r--. 1 root root 243 Jun 30 2022 virt-ol8.repo
Final Solution
I deleted this file, and that seemed to do the trick:
root@dev:/etc/yum.repos.d> rm oci-included-ol8.repo
rm: remove regular file 'oci-included-ol8.repo'? y
The contents of this file are shown here. I don't know for sure whether this repo is simply unavailable or experiencing momentary issues:
[ol8_oci_included]
name=Oracle Software for OCI users on Oracle Linux $releasever ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL8/oci/included/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
Addressing Yum Hanging Issues
There are multiple other attempts I could have explored to help with the hanging issue, but fortunately I did not require them.
For reference, some of the commands that I would have attempted had the solution above not worked include:
yum clean all
yum clean metadata
rpm --rebuilddb
yum list all
yum update
Perhaps I could even consider running an strace
to see where the process is hanging:
strace yum --verbose --noplugins info
References: