Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a cPanel server I want to install some packages on. I connected to the server as root and ran the following commands to update and delete all the existing repositories:

yum update
yum clean all
rm -f /etc/yum.repos.d/*
rm -rf /var/cache/yum/*

My last command was to install the PDO PHP module, but that's when I got an error:

root@linux [~/TMP]# pecl install pdo
WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO"
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
building in /var/tmp/pear-build-root/PDO-1.0.3
running: /root/tmp/pear/PDO/configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in `/var/tmp/pear-build-root/PDO-1.0.3':
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/PDO/configure' failed
root@linux [~/TMP]# pecl install bdoNo releases available for package "pecl.php.net/bdo"
install failed

What causes this error? How can I fix it?


Edit: Also, when I run yum install php*, after checking dependencies I get this:

--> Finished Dependency Resolution
Error: Package: rrdtool-php-1.3.8-6.el6.x86_64 (base)
           Requires: php(zend-abi) = 20090626

Edit: I uploaded my config.log and config.status files

share|improve this question
    
Upload (e.g. to pastebin.com) the full contents of config.log and config.status. –  Gilles Nov 3 '11 at 23:30
add comment

2 Answers

You have to install packages containing development tools required for compilation. You can install them one-by-one :

yum install gcc
yum install make
...
yum install glibc-devel

Or you can install in one command a lot of them :

yum groupinstall "Development Tools"
share|improve this answer
add comment

This blog post seems to have an answer.

I did not have cc installed, and installed gcc, that worked for me.

yum install gcc
pecl install pdo
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.