Installing the MongoDB pecl extension on a cPanel server

If your cPanel server has /tmp mounted with the noexec option you may run into the following error when trying to install the extention.

 

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

You can remount /tmp with exec, run the pecl install and than remount /tmp again with no exec:

 

 

  • mount -o,remount,rw,exec /var/tmp
  • pecl install mongo
  • mount -o,remount,rw,noexec /var/tmp

 

If you are not comfortable remounting /tmp. You can try the following instead which will create a symlink to another mount that doesn't have the noexec option.

  • mkdir /root/tmp.pear
  • mkdir /root/tmp.pear-build-root
  • rm -rf /tmp/pear*
  • ln -s /root/tmp.pear /tmp/pear
  • ln -s /root/tmp.pear-build-root /tmp/pear-build-root
  • pecl install mongo

 

 

  • 119 Users Found This Useful
Was this answer helpful?

Related Articles

Recovering the MongoDB replicaset after a hard server reboot on 32bit systems

If one of your check servers crashes/was hard rebooted and it is running MongoDB you will most...

Adding ServerPing Package

  Login to your WHMCS Admin Area and go to Setup->Products/Services->Products/Services...

EULA

END USER LICENSE AGREEMENT This copy of ServerPing ("the Software Product") and...

Setting up WHMCS Help Desk Alerts

ServerPing allows you to offer a monitoring with response service by giving customers the option...

Using an SMTP Server to Send Email Alerts

By default ServerPing will send email alerts using sendmail on the check worker server. If you...