Posts tagged configure: error: cannot run C compiled programs. If you meant to cross compile

cannot run C compiled programs

If you are getting the above error while installing any module using

"pecl install modulename" 

then it means that the executable permission is not set on /tmp or /var/tmp

[email protected][~]# mount | grep /tmp
 /usr/tmpDSK on /tmp type ext2 (rw,noexec,nosuid)
 /tmp on /var/tmp type none (rw,noexec,nosuid,bind)

So, in-order to complete the pecl installation just remount the /tmp and /var/tmp with executable permissions as :

[email protected][#] mount -o remount rw /tmp
[email protected][#] mount -o remount rw /var/tmp

And now just try the pecl install modulename and it will work like a charm.

example :

[email protected][#] pecl install imagick
That’s all you are done.