Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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,
    }
}
share|improve this question

1 Answer 1

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 serverfault.com/questions/111766/… Ill look at the docs some more and see if i can get more info. –  user227759 Jun 24 '14 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. –  yoonix Jun 24 '14 at 20:37

Your Answer

 
discard

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.