PHP pecl Troubleshooting
Error Message:
/usr/bin/phpize: /tmp/tmpjMvBZg/package.x.x/build/shtool: /bin/sh: bad interpreter: Permission denied
If you receive the above error message while installing a package using “pecl”, it meant that the /tmp partition is mounted in “noexec” mode and that you do not have permissions to execute anything under /tmp partition.
Execute the “mount” command and you will see something like:
root@server [~]# mount
tmpfs on /tmp type ext3 (rw,noexec,nosuid)
To mount the /tmp partition in rw mode, execute:
root@server [~]# mount -o remount rw /tmp
Now, you can execute the “pecl” command to install the package you like. Once done, you can remount /tmp with noexec mode again:
root@server [~]# mount -o remount rw,noexec,nosuid /tmp
Error Message:
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable is set correctly and then rerun this script. or Cannot find autoheader. Please check your autoconf installation and the $PHP_AUTOHEADER environment variable is set correctly and then rerun this script.
If you receive the above error message while installing a package using “pecl”, it meant that the pecl is not configured correctly in your linux box. to configure correct autoconf and autoheader, find autoconf or autoheader file and apply following command:
root@server [~]# export PHP_AUTOCONF=/usr/bin/autoconf
root@server [~]# export PHP_AUTOHEADER=/usr/bin/autoheader
Enjoy installing php modules via “pecl install modulename” now!
root@server [~]# export PHP_AUTOHEADER=/usr/bin/autoheader
