3

I have been trying to do a few PECL installations, but all of them return the same type of error. Something related to timezones? Im running RedHat x86_64 es5.

Attempting to install geoip-1.0.7:

root@server [~]# pecl install geoip-1.0.7
downloading geoip-1.0.7.tgz ...
Starting to download geoip-1.0.7.tgz (9,416 bytes)
.....done: 9,416 bytes

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CST/-6.0/no DST' instead in PEAR/Validate.php on line 489

Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CST/-6.0/no DST' instead in /usr/local/lib/php/PEAR/Validate.php on line 489
3 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
building in /var/tmp/pear-build-root/geoip-1.0.7
running: /root/tmp/pear/geoip/configure
checking for egrep... 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: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
ERROR: `/root/tmp/pear/geoip/configure' failed

What is going on? Anyone that could assist please...

0

3 Answers 3

1

from my exeperience, "pecl install packagename" rarely works.

i simply download latest pecl tarball, uncompress, phpize (make sure php is in you path after you compile/install it), ./configure, make, make install, service php-fpm restart

so for instance, wth the geo-ip pecl package, try

wget http://pecl.php.net/get/geoip-1.0.8.tgz
cd geoip-1.0.8
phpize
./configure
make
make install
echo "extenstion=geoip.so" >> /path/to/php.ini
sudo service php-fpm|apache restart

EDIT:

if you are missing a developmen package, the compilation error will tell you, and you then

yum install missingpkg-dev

EDIT:

the specific reason your package appears to not install, is that it is built for a diffent system. in general, if you compile from source, you will be happier cuz you know whats going on.

0

Try:

mount -o remount,exec,suid /tmp
mount -o remount,exec,suid /var/tmp
5
  • I already have it installed (Package gcc-4.1.2-50.el5.x86_64 already installed and latest version). Any other ideas?
    – Petrusa
    Jan 28, 2011 at 17:23
  • Add output: env | grep CC
    – alvosu
    Jan 28, 2011 at 17:27
  • Got the same type of errors when testing "CC=/usr/bin/gcc-4.1 pecl install geoip-1.0.7"
    – Petrusa
    Jan 28, 2011 at 17:29
  • removing the noexec flag on both /tmp and /var/tmp
    – alvosu
    Jan 28, 2011 at 17:37
  • You can get compiled package php-pecl-geoip from EPEL. Certainly, it's not the solution, but probably you haven't enough time for now to find out what causes the issue.
    – Denis
    Jan 28, 2011 at 18:44
0

The timezone warnings (which you should correct by setting a timezone in your php.ini) are completely separate from the actual issue, which is the "error: cannot run C compiled programs" line. You likely don't have gcc and/or make installed from your package manager. yum groupinstall "Development Tools" or yum install gcc make may do the trick.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .