inside the mind of a linux admin

PECL install fails / how to compile manually

When attempting to compile using PECL install, you will likely get an error stating:

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

This is due to the environment CentOS and Redhat flavors have for the /tmp directory. Rather than remounting /tmp without exec, you can compile the module manually on the user account. In this example, I’m compiling and installing the APC module. NOTE: ensure you are doing this ON the user’s account and not as root unless you want the module installed server wide.

cd ~
mkdir setups
cd setups
wget http://pecl.php.net/get/APC-3.1.2.tgz
tar -xvf APC-3.1.2.tgz
cd APC-3.1.2
phpize && ./configure –with-apxs && make

This will compile the module successfully, without the need to write or execute compiled programs in /tmp. Now simply add the extension to php.ini and ensure it loads in phpinfo().

You’re done.

Related Posts

synergy: How to enable crypto (encryption) and generate SSL certificate

The newer Linux versions of the popular mouse/keyboard sharing application “synergy” now has built in encryption. Here’s how to configure it: Just simply passing the –enable-crypto flag on your synergy server without having a proper SSL certificate will result in the inability to connect to clients and generate an error message similar to this in […]

Read More

Change Number Pad Delete (dot) key from a comma in Ubuntu Linux

I recently purchased a new keyboard and updated to the latest Ubuntu, I’m also an avid user of the number pad for quick input when dealing with spreadsheets or accounting. I found that my num pad’s delete key (“.”) was outputting a comma (“,”) instead. Pretty annoying? I agree, but this can be very easily […]

Read More

1 Comment

  • Susie Trollope on Saturday, March 20, 2010

    I am new to blogging, so I feel like I am in the “just taking notes” phase. But when I do find a blog topic I like, I do comment because I genuinely like what has been said or the information was helpful to me. I am officially linked to your blog now, so I will be checking in often! Thanks for all the great advice.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.