0

I'm new to Chef. I [think I] am installing php-mysql using

package 'php-mysql' do
    action :install
    notifies :restart, 'httpd_service[apps]'
end

However, when I run the test

describe package 'php-mysql' do
    it { should be_installed }
end

It fails saying System Package php-mysql should be installed (expected that 'System Package php-mysql' is installed).

Moreover, other packages as php-pdo, php-intl, their tests passes. (declaration and tests are exactly the same, just change the name).

I'm using remi repo for php 5.5 packages with the yum-remi-chef cookbok.

Am I missing something?

UPDATE:

By running package 'php-pdo_mysql' I get the following output;

yum_package[php-pdo_mysql] action install[2016-10-14T20:24:00+00:00] WARN: yum_package[php-pdo_mysql] matched multiple Provides for php-pdo_mysql but we can only use the first match: php-mysql. Please use a more specific version.

           - install version 5.4.45-12.el6.remi of package php-mysql

Is it installing the wrong version?, since it says 5.4

Christopher Francisco
  • 15,672
  • 28
  • 94
  • 206

1 Answers1

1

Probably because php-mysql package doesn't exist anymore for 5.5+.

The mysql, mysqli and pdo_mysql extensions are now provided by the php-mysqlnd package.

The old php-mysql package was using libmysqlclient instead of mysqlnd.

See Overview of the MySQL PHP drivers

P.S. installation works, because yum pulls the right package.

Community
  • 1
  • 1
Remi Collet
  • 6,198
  • 1
  • 20
  • 25