1

I am trying to get a more recent version of php and mysql on a centos 6.5 x64 box. I added the yum repos epel and remi and have the remi as a dependency for php but it will not install.

The error I get is Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install php' returned 1: Error: Cannot retrieve repository metadata (repomd.xml) for repository epel. Please verify its path and try again

If I understand this right it is trying to get php from epel instead of remi? How can I fix this?

node default { yumrepo { 'epel': baseurl => 'http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm', descr => 'epel', enabled => 1, gpgcheck => 1 } yumrepo { 'remi': baseurl => 'http://rpms.famillecollet.com/enterprise/remi-release-6.rpm', descr => 'remi', enabled => 1, gpgcheck => 1, require => Yumrepo['epel'] } # PHP package {'php': ensure => 'present', before => File['/etc/php.ini'], require => Yumrepo['remi'] } package {'php-cli': ensure => 'present', require => Package['php'] } file {'/etc/php.ini': ensure => file, } } 

1 Answer 1

0

It's not trying to isntall php from EPEL, it's trying to get information on EPEL. It has to get repository information from all your enabled repos before it can determine where to pick the package from. Start by trying to get to EPEL (and the remi repository) from a web browser on that computer - or via a wget - and go from there.

4
  • wget works fine for both links. Commented Jun 24, 2014 at 19:43
  • I'm not a Puppet user, but I would have to ask why you specify the path to a single package in the baseurl variable for an entire repo. It doesn't seem to me like that would work out too well for yum... Commented Jun 24, 2014 at 19:46
  • I am new to puppet too which is why im asking for help here. I got the baseurl thing from serverfault.com/questions/111766/… Ill look at the docs some more and see if i can get more info. Commented Jun 24, 2014 at 19:55
  • 1
    @John is right, it's your baseurls. Remove whatever you put in your yum configs for epel and remi, then install those packages. Those are not repos, those are packages. When you install the package it configures the repo. If you want to handle it via puppet creating repos and not the package.. install the package somewhere so you can see what the configs should really look like. Commented Jun 24, 2014 at 20:37

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.