LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 02-23-2011, 03:24 PM   #1
jarco
LQ Newbie
 
Registered: Apr 2007
Location: Flanders
Distribution: Fedora / Centos / Elementary / Debian / Ubuntu / Manjaro
Posts: 19

Rep: Reputation: 0
yum problem: section headers missing


ok. I am using a Centos virtual server with plesk. In my not so successful quest to get my php version updated I seem to have something wrong with yum.

I get this error when trying to use it:

[root@ims34177 ~]# yum update php
Loaded plugins: fastestmirror
Config Error: File contains no section headers.
file: file://///etc/yum.repos.d/CentOS-Testing.repo, line: 1
' # CentOS-Testing:\n'

I just want to get php to a version where it supports joomla 1.6.

Any tips?
 
Old 02-23-2011, 03:39 PM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Perhaps you could post the contents of /etc/yum.repos.d/CentOS-Testing.repo? When you post the output please surround your code with code blocks, for example:

Example code block usage

Regards,

Fordeck

Last edited by fordeck; 02-23-2011 at 03:40 PM.
 
Old 02-23-2011, 04:02 PM   #3
jarco
LQ Newbie
 
Registered: Apr 2007
Location: Flanders
Distribution: Fedora / Centos / Elementary / Debian / Ubuntu / Manjaro
Posts: 19

Original Poster
Rep: Reputation: 0
Code:
[root@ims34177 ~]# cat /etc/yum.repos.d/CentOS-Testing.repo
  # CentOS-Testing:
  # !!!! CAUTION !!!!
  # This repository is a proving grounds for packages on their way to
CentOSPlus and CentOS Extras.
  # They may or may not replace core CentOS packages, and are not
guaranteed to function properly.
  # These packages build and install, but are waiting for feedback from
testers as to
  # functionality and stability. Packages in this repository will come
and go during the
  # development period, so it should not be left enabled or used on
production systems without due
  # consideration.
  [c5-testing]
  name=CentOS-5 Testing
  baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
  enabled=1
  gpgcheck=1
  gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
  includepkgs=php*
[root@ims34177 ~]#
Is this what you mean?
 
Old 02-23-2011, 06:13 PM   #4
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
It looks like all of the lines in this file have leading spaces. The lines can not begin with spaces. Try stripping the leading spaces off of each line and then try your update again.

Regards,

Fordeck
 
Old 02-23-2011, 06:30 PM   #5
jarco
LQ Newbie
 
Registered: Apr 2007
Location: Flanders
Distribution: Fedora / Centos / Elementary / Debian / Ubuntu / Manjaro
Posts: 19

Original Poster
Rep: Reputation: 0
Fantastic. That was the solution. Great and fast help. I see the stories about the Linux community are true.
 
Old 02-23-2011, 06:34 PM   #6
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Good to hear that it worked. If your issue is solved please mark this thread as solved using the Thread Tools at the top of the page.

Regards,

Fordeck

Sorry looks like you already did.

Last edited by fordeck; 02-23-2011 at 06:37 PM.
 
Old 01-29-2013, 02:03 PM   #7
JerZ
LQ Newbie
 
Registered: Jan 2013
Posts: 5

Rep: Reputation: Disabled
I am running into this same problem. This is the message I am getting though:

Loaded plugins: fastestmirror
File contains no section headers.
file: file://///etc/yum.repos.d/CentOS-Media.repo, line: 8
‘yum –enablerepo=c6-media\\n\n’
Usage: yum [options] COMMAND


I followed the advice about the leading spaces however I still get this message.
 
Old 01-29-2013, 02:25 PM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post # 7, @ JerZ : Welcome to LQ.

Quote:
‘yum –enablerepo=c6-media\\n\n’
That's an odd hyphen ( – ).
Yum options with hyphens are with two hyphens : --<option> .

So it could be : ‘yum --enablerepo=c6-media\\n\n’
... if the other characters are right.

-
 
Old 01-29-2013, 02:29 PM   #9
JerZ
LQ Newbie
 
Registered: Jan 2013
Posts: 5

Rep: Reputation: Disabled
You are correct it should be -- and not the single -. Also to add to this, I am trying to install the perl package off of a local repository (DVD). I deleted the "\n" from my .conf.
 
Old 01-29-2013, 02:47 PM   #10
JerZ
LQ Newbie
 
Registered: Jan 2013
Posts: 5

Rep: Reputation: Disabled
This is what the .conf looks like.
Attached Thumbnails
Click image for larger version

Name:	CentOS_Conf.jpg
Views:	463
Size:	99.2 KB
ID:	11730  
 
Old 01-29-2013, 03:37 PM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,702

Rep: Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659
JerZ
you really do NOT want to use the centos 6 install dvd as a source for rpms
( unless you have NO other choice , as it you are in the middle of nowhere with NO network connection)

the dvd is very out of date
the centos 6.3 dvd is less out of date than the centos 6.0 , but still out of date.
the centos 6.3 dvd was released on July 9 2012 .
the centos 6.0 dvd was released on July 10 2011.

the install media repo should normally be turned off .
this is normally done during the install , but do to bugs it is not always turned off .
 
Old 01-29-2013, 03:48 PM   #12
JerZ
LQ Newbie
 
Registered: Jan 2013
Posts: 5

Rep: Reputation: Disabled
I have CentOS 6.3 (Minimal) running on (2) servers that do not have internet connections. I am running them on ESXi 5.1 and I need to install VMWare tools, but can't do to not having perl installed.

The idea of wiping and starting fresh was brought up and using Basic Server instead. Is this a better idea?
 
Old 01-29-2013, 08:51 PM   #13
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,702

Rep: Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659Reputation: 2659
you can set up a personal "repo" for the prerequisites needed on a computer that dose have a internet connection
transfer them to a usb and use that to install rpm's on the servers
or
temporally get the two servers a outside connection


but seeing as you are just at the start of all this a new clean install would be better for a starting point
 
Old 12-27-2017, 12:21 AM   #14
Riazjamali
LQ Newbie
 
Registered: Dec 2017
Posts: 1

Rep: Reputation: Disabled
yum repo list

i m using Redhad , facing this issue
i cant update modifiey or insatall any package

file: file://///etc/yum.repos.d/redhat.repo, line: 9
'[]\n'
 
  


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
problem with yum (missing python module) Al-Kateb Linux - Software 5 10-09-2010 01:35 PM
yum error: missing dependency problem brusel Red Hat 5 01-09-2008 11:23 AM
yum error: missing dependency problem brusel Linux - Enterprise 1 01-09-2008 05:19 AM
Yum update problem... Missing dependecies? Yig Linux - Software 3 01-03-2007 03:33 PM

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

All times are GMT -5. The time now is 09:40 AM.

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