Centos – Installing thesqlnd for php 5.4.9 on CentOs 6.3

centosMySQLrpm

Okay let me get straight to the point, I am a complete noob, and have never done stuff like this at all, I have read tutorial after tuorial but I cant get anything to work. When I tried to install the rpm file I got this error

rpm -Uvh ftp://ftp.pbone.net/mirror/rpms.famillecollet.com/enterprise/6/test/x86_64/php-mysqlnd-5.4.9-1.el6.remi.x86_64.rpm
Retrieving ftp://ftp.pbone.net/mirror/rpms.famillecollet.com/enterprise/6/test/x86_64/php-mysqlnd-5.4.9-1.el6.remi.x86_64.rpm
warning: /var/tmp/rpm-tmp.ez4vvd: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
error: Failed dependencies:
        php-pdo(x86-64) = 5.4.9-1.el6.remi is needed by php-mysqlnd-5.4.9-1.el6.remi.x86_64

so I tried installing that rpm file and got this error

rpm -ivh ftp://ftp.pbone.net/mirror/rrpms.famillecollet.com/enterprise/6/test/x86_64/php-pdo-5.4.6-1.el6.remi.x86_64.rpm
Retrieving ftp://ftp.pbone.net/mirror/rrpms.famillecollet.com/enterprise/6/test/x86_64/php-pdo-5.4.6-1.el6.remi.x86_64.rpm
curl: (9) Server denied you to change to the given directory
error: skipping ftp://ftp.pbone.net/mirror/rrpms.famillecollet.com/enterprise/6/test/x86_64/php-pdo-5.4.6-1.el6.remi.x86_64.rpm - transfer failed

I used the ftp links because I have no idea how else to get them to the server. I think I am getting overly frustrated with this, but I have to get this driver installed for any of my scripts to function correctly.

Any help would be greatly appreciated!

Best Answer

Try to add the Remi repository to yum and install it that way. Yum will automatically deal with all the dependencies for you, so you don't have to follow the breadcrumb path all the way to the final dependency. Saves you lot of time and frustration :)

As root user, run these commands:

wget http://rpms.famillecollet.com/enterprise/remi.repo -O /etc/yum.repos.d/remi.repo
yum --enablerepo=remi-test install php-mysqlnd

The first command will retrieve the repository configuration file for Remi's repo. The second command will install the php-mysqlnd package and will also use the Remi repo to install it.