MongoDB : Getting “parsing errors” When Running ‘yum repolist’
The Problem
When adding an extra repository of the public yum into existing yum repository configuration file, the following errors are shown:# yum repolist Loaded plugins: langpacks, ulninfo File contains parsing errors: file:///etc/yum.repos.d/public-yum-ol7.repo [line 91]: name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux 7Server (x86_64) [line 92]: baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/UEKR4/x86_64/ [line 93]: gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle [line 94]: gpgcheck=1 [line 95]: enabled=1
[ol7_UEKR4] name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/UEKR4/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1
The Solution
There is a space at the beginning of each line of the new entries. The file looks like:
[ol7_latest]
name=Oracle Linux $releasever Latest ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/latest/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 [ol7_UEKR3] name=Latest Unbreakable Enterprise Kernel Release 3 for Oracle Linux $releasever ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/UEKR3/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 [ol7_UEKR4] name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/UEKR4/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1
1. Edit the yum repo file /etc/yum.repos.d/public-yum-ol7.repo.
# vi /etc/yum.repos.d/public-yum-ol7.repo
[ol7_UEKR4] name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch) baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL7/UEKR4/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1
4. Check that the stanzas were saved properly:
# less /etc/yum.repos.d/public-yum-ol7.repo
# yum repolist
Comments
Post a Comment