yum config error parsing file failed - yum won't run
F7 fresh install - running ok but can't update.Yum has never run at all.
How do i make yum run ? This happens: [root@localhost ~]# yum CRITICAL:yum.cli:Config Error: Parsing file failed: File contains no section headers. file: file:///etc/yum/yum.conf, line: 1 ' [main]\n' ======== This is yum.conf: [main] cachedir=/var/cache/yum keepcache=0 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 metadata_expire=1800 # PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d =========== mike |
Your /etc/yum/yum.conf looks ok. What do your repos in /etc/yum.repos.d look like?
Try: yum clean all Then try yum again |
Quote:
There are 3 files: fedora.repo fedora-updates.repo fedora-updates-testing.repo Note: gpgcheck=0 was =1 but i changed it to =0 (no difference in error) (( side question: how do i attach the file to this thread rather than copying it in ??) Contents: fedora.repo fedora] name=Fedora $releasever - $basearch #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY [fedora-debuginfo] name=Fedora $releasever - $basearch - Debug #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch enabled=0 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY [fedora-source] name=Fedora $releasever - Source #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch enabled=0 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY ================ fedora-updates.repo [updates] name=Fedora $releasever - $basearch - Updates #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora [updates-debuginfo] name=Fedora $releasever - $basearch - Updates - Debug #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/$basearch/debug/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f$releasever&arch=$basearch enabled=0 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora [updates-source] name=Fedora $releasever - Updates Source #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/$releasever/SRPMS/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-source-f$releasever&arch=$basearch enabled=0 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora ======================= fedora-updates-testing.repo [updates-testing] name=Fedora $releasever - $basearch - Test Updates #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/$releasever/$basearch/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f$releasever&arch=$basearch enabled=0 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test [updates-testing-debuginfo] name=Fedora $releasever - $basearch - Test Updates Debug #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/$releasever/$basearch/debug/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-debug-f$releasever&arch=$basearch enabled=0 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test [updates-testing-source] name=Fedora $releasever - Test Updates Source #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/$releasever/SRPMS/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-source-f$releasever&arch=$basearch enabled=0 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test ======================== Quote:
|
emuub
My only guess is that you have a corrupted yum. You can try here to get another one: http://download.fedora.redhat.com/pu...fc7.noarch.rpm The server has been a little slow today. Ok a lot slow. Good Luck Lazlow |
quote:Lazlow: My only guess is that you have a corrupted yum.
I have now un-installed (rpm -e) yum ad its dependancies, pirut, yum-updatesd re-installed just yum-3.2.0-1.fc7 from the dvd. same problem (( [root@localhost ~]# yum CRITICAL:yum.cli:Config Error: Parsing file failed: File contains no section headers. file: file:///etc/yum/yum.conf, line: 1 ' [main]\n')). ================== will download a new version and see if that helps. . . . mike |
replaced old dvd yum installation with new downloaded rpm copy.
No change. |
solved - its too many spaces !
I found that there was a space before every line of yum.conf. Edited it with vi to remove them (even before the #d lines).
Yum now runs as it should :) |
It is always the simple stuff that bites us in the butt. Another one to look for is there MUST be a return (enter or whatever) at the end of the file.
Sorry I was not of more help. Lazlow |
Thanks for trying !
Just talking about a problem often helps me |
in fact, the problem is obvious, you have type a blankspcae before "[main]", it should be
****************** '[main]\n' ... ****************** while yours is ****************** ' [main]\n' ****************** so, delete the bankspace before "[main]" and it will be ok |
All times are GMT -5. The time now is 10:16 PM. |