anebg 2 geek life, brainstorm, computing!

6Apr/102

Install pdo_mysql on CentOS

I tried installing it by runing pecl install pdo_mysql but I got this error:

configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
ERROR: `/root/tmp/pear/temp/PDO_MYSQL/configure' failed

The problem is that the /tmp and /var/tmp directories are noexec, which prevents pecl build scripts from running.

Here is what can be done to resolve the problem (assuming root account)

mkdir /root/tmp.pear

mkdir /root/tmp.pear-build-root

rm -rf /tmp/pear*

ln -s /root/tmp.pear /tmp/pear

ln -s /root/tmp.pear-build-root /tmp/pear-build-root

pecl install pdo_mysql should now work.

Filed under: Linux, Server Leave a comment
Comments (2) Trackbacks (0)
  1. nope, still get same error.


Leave a comment

(required)

No trackbacks yet.