debian: error: Cannot find php_pdo_driver.h

I recently got so fed up with Unity, I decided it was time for me to find something new. In the process, I’ve also decided it might be best to reinstall my machine with Debian instead of Ubuntu. I’ve decided a lot, lately. Since I use PDO with PostgreSQL, I tried to install the pdo_pgsql PECL package, but it failed with the message “Configure: Error: Cannot find php_pdo_driver.h“. Now, I was pretty sure that I had that file on my box, it was located in /usr/include/php5/ext/pdo/. Nevertheless, configure couldn’t find it. Turns out it was looking in a different directory; /usr/include/php/ext/pdo.

The simplest solution I could think of:

 ln -s /usr/include/php5 /usr/include/php

It worked like a charm :)  Of course, it’d be even better to compile PHP myself, but that’s for a different day.

Category: Uncategorized 5 comments »

5 Responses to “debian: error: Cannot find php_pdo_driver.h”

  1. gnusam

    Works on ubuntu too :)

  2. henk

    Thanks! Works like a charm

  3. grok

    Beauty! Fixed my ubuntu pecl install issue.
    If you had a “like” button – I would definitely click it!
    :-)

  4. donnie-darko

    You save my day, man!
    thx

  5. Shane

    Thanks, this had me stumped for hours.


Leave a Reply



Back to top