LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-03-2012, 06:33 AM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Question YUM Error - "CRITICAL:yum.cli:Config Error"


Hi All,

I am sitting on a CentOS 6.2 machine and trying to use -c option of yum.

I am facing the below error.
Code:
root@kick:~# yum install quartz -c http://192.168.1.100/yum/EXTRA/SPACEWALK64Bit 
CRITICAL:yum.cli:Config Error: Parsing file failed: File contains no section headers.
file: http://192.168.1.100/yum/EXTRA/SPACEWALK64Bit, line: 1
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\n'
root@kick:~#
This is my repo file, I am not sure what I am missing here.
Code:
root@kick:~# cat /etc/yum.repos.d/spacewalk.repo
[SPACEWALK-64-Bit]
name=Spacewalk-Server-64-Bit
baseurl=http://192.168.1.100/yum/EXTRA/SPACEWALK64Bit
gpgcheck=0
enabled=0
My yum is working fine without -c option.
Code:
root@kick:~# yum install quartz --enablerepo=SPACEWALK-64-Bit -q

===============================================================================================================================================================================================
 Package                                                  Arch                                Version                                      Repository                                     Size
===============================================================================================================================================================================================
Installing:
 quartz                                                   noarch                              1.8.1-3.el5                                  SPACEWALK-64-Bit                              408 k
Installing for dependencies:
 jakarta-commons-collections                              noarch                              3.2.1-3.4.el6                                RHEL_6.2_64_Bit                               523 k
 jakarta-commons-logging                                  noarch                              1.0.4-10.el6                                 RHEL_6.2_64_Bit                                52 k
 spacewalk-slf4j                                          noarch                              1.6.1-1.el5                                  SPACEWALK-64-Bit                               31 k

Transaction Summary
===============================================================================================================================================================================================
Install       4 Package(s)

Is this ok [y/N]: n
Exiting on user Command
root@kick:~#

Any suggestions to overcome this ?
 
Old 05-03-2012, 06:37 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well it just makes no sense. your yum command says to use "http://192.168.1.100/yum/EXTRA/SPACEWALK64Bit" as a config file, yet in the repo config file, you say that that same location is a baseurl for the repo...
 
Old 05-03-2012, 08:05 AM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Thumbs up Thanks

Quote:
Originally Posted by acid_kewpie View Post
well it just makes no sense. your yum command says to use "http://192.168.1.100/yum/EXTRA/SPACEWALK64Bit" as a config file, yet in the repo config file, you say that that same location is a baseurl for the repo...
Many thanks acid_kewpie, you have once again helped me.

It was my bad, I was using the wrong syntax (actually I took hint from a website, now which was wrong I think).

This is what I needed. Many thanks again
Code:
yum install quartz -c http://192.168.1.100/repos/spacewalk.repo --enablerepo=SPACEWALK-64-Bit
However, Is there any possibility to use two "-c" switches, in the same yum command.
Below is not working,
Code:
yum install quartz -c http://192.168.1.100/repos/rhel-6.2_64.repo -c http://192.168.1.100/repos/spacewalk.repo
It uses the repo file given in second (or last) "-c" switch.

There may be workaround for this, just wanted to check if two (or more) URLs can be given in a single comamnd by any means.
 
Old 05-03-2012, 08:13 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
why can't you just use a local config? If this is scripted, just build one at run time?
 
Old 05-03-2012, 08:17 AM   #5
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Thumbs up

Quote:
Originally Posted by acid_kewpie View Post
why can't you just use a local config? If this is scripted, just build one at run time?
Yes, I can but just wanted to check whether having two paths is possible or not.

Anyways, I am closing this thread. Thanks again.
 
  


Reply



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 fails with "GLib-CRITICAL" Seregwethrin Linux - Software 4 07-30-2012 08:39 PM
Problems with Yum: error: unrecognized db option: "usecursors" ignored. griffey Red Hat 8 04-28-2011 03:55 PM
CRITICAL:yum.cli Config Error yum.conf in RHEL 6.0 chunrima Linux - Software 2 12-09-2010 06:19 PM
yum config error parsing file failed - yum won't run emuub Linux - Software 9 11-04-2008 05:48 AM
"HELP!!" yum error [Errno 14] HTTP Error 401: Unauthorized chennavarri Fedora 2 05-14-2008 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:03 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