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 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Articles Relacionats

Adding ServerPing to your Client Area template

You will need to provide a link to the SeverPing module from your client area. We recommend...

Setting up WHMCS to work with the Public Report Page

WHMCS includes the header.tpl and footer.tpl file on every request made from an addon module. In...

Using a custom module name/link for your client area

In order to access the client area of serverping from a custom module name, you will need to...

Terms and Conditions

Terms and Conditions   Agreement between user and serverping.net Welcome to serverping.net....

Installation Guide

Requirements You will need at least one Cent OS 6 (64 bit recommended) VPS/Dedicated server with...