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 Answers1

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.

John
  • 9,208
  • 1
  • 32
  • 34