LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (http://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   yum problem: section headers missing (http://www.linuxquestions.org/questions/linux-distributions-5/yum-problem-section-headers-missing-864610/)

jarco 02-23-2011 04:24 PM

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?

fordeck 02-23-2011 04:39 PM

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

jarco 02-23-2011 05:02 PM

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?

fordeck 02-23-2011 07:13 PM

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

jarco 02-23-2011 07:30 PM

Fantastic. That was the solution. Great and fast help. I see the stories about the Linux community are true.

fordeck 02-23-2011 07:34 PM

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.

JerZ 01-29-2013 03:03 PM

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.

knudfl 01-29-2013 03:25 PM

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.

-

JerZ 01-29-2013 03:29 PM

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.

JerZ 01-29-2013 03:47 PM

1 Attachment(s)
This is what the .conf looks like.

John VV 01-29-2013 04:37 PM

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 .

JerZ 01-29-2013 04:48 PM

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?

John VV 01-29-2013 09:51 PM

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


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