LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 10-24-2004, 06:52 PM   #1
acidblue
Member
 
Registered: Apr 2003
Posts: 152

Rep: Reputation: 15
Yum not working


This is the error messages I get when I try to run yum:

[root@darkstar root]# yum check update
Traceback (most recent call last):
File "/usr/bin/yum", line 30, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum/yummain.py", line 163, in main
(log, errorlog, filelog, conf, cmds) = parseCmdArgs(args)
File "/usr/share/yum/yummain.py", line 75, in parseCmdArgs
conf=yumconf(configfile=yumconffile)
File "/usr/share/yum/config.py", line 48, in __init__
self.cfg.read(configfile)
File "/usr/lib/python2.3/ConfigParser.py", line 263, in read
self._read(fp, filename)
File "/usr/lib/python2.3/ConfigParser.py", line 456, in _read
raise MissingSectionHeaderError(fpname, lineno, `line`)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /etc/yum.conf, line: 1
'\xef\xbb\xbf[main]\n'

This is my yum.conf file

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20

[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/

[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/

#[updates-testing]
#name=Fedora Core $releasever - $basearch - Unreleased Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/$releasever/$basearch/

#[development]
#name=Fedora Core $releasever - Development Tree
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/
 
Old 10-24-2004, 08:29 PM   #2
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Re: Yum not working

Quote:
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /etc/yum.conf, line: 1
'\xef\xbb\xbf[main]\n'
Yum sees extra characters in front of [main]. Can you take a text editor, delete the first line, then put back [main]? If that doesn't help, delete /etc/yum.conf, "rpm -e yum" and reinstall the package.
 
Old 10-24-2004, 08:41 PM   #3
acidblue
Member
 
Registered: Apr 2003
Posts: 152

Original Poster
Rep: Reputation: 15
OMG, that worked I just did what you said, re-typed the first line, don't know why that worked ,there weren't any spaces or anything on the first line, but hey what ever works right?
 
Old 10-24-2004, 08:47 PM   #4
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
A good text editor (e.g. Emacs) would have displayed a character.

In a non-Unicode locale, you would have seen the extra values, too:

Code:
$ env LC_ALL=C less yum.conf
"yum.conf" may be a binary file.  See it anyway?

<EF><BB><BF>[main]
and so on.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
YUM not working namit Linux - Software 2 11-17-2005 06:50 AM
yum not working saipraveen Linux - Newbie 4 08-22-2005 11:34 PM
Getting and working with YUM redhat beginer Linux - Software 3 04-24-2005 12:20 PM
yum/apt not working` maybbach Linux - Software 5 04-21-2005 11:06 PM
Yum Not working ntesla Linux - Software 2 08-06-2004 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration