Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 => '',
        descr => 'epel',
        enabled => 1,
        gpgcheck => 1

    yumrepo { 'remi':
        baseurl => '',
        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,
share|improve this question

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.

share|improve this answer
wget works fine for both links. – user227759 Jun 24 '14 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... – John Jun 24 '14 at 19:46
I am new to puppet too which is why im asking for help here. I got the baseurl thing from… Ill look at the docs some more and see if i can get more info. – user227759 Jun 24 '14 at 19:55
@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. – yoonix Jun 24 '14 at 20:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.