Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PECL install fails

Tags:

c

centos

pear

pecl

I have browsed every Google result, read all the forum posts about this error, but I cannot solve it.

When using PECL install for anything, I always end up getting this error:

checking whether the C compiler works... configure: error: cannot run C compiled programs.

Everything else succeeds up to that point them bam!

I'm using CentOS 4.3, PEAR is the latest stable version, GCC is a stable and recent version. Everything is working as it should, but the C compiler always seems to error. I've tried to make tmp have the right privilages for the operation by temporarily enabling it using:

mount -o remount,exec,suid /tmp

But that doesn't work.

I've literally tried everything that has been suggested by to no avail. Any ideas?

like image 485
James Avatar asked May 23 '09 12:05

James


1 Answers

I'm on Centos 5.3 and I was able to get PECL installers running (APC in my case) successfully by removing the noexec flag on both /tmp and /var/tmp

mount -o remount,exec,suid /tmp
mount -o remount,exec,suid /var/tmp

Doing this only on /tmp didn't work - I still received the error "checking whether the C compiler works... configure: error: cannot run C compiled programs."

Remember to run these remounts again with noexec after your install finishes.

like image 76
Steven Avatar answered Oct 03 '22 23:10

Steven