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
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

How to revert back to X11 / Xorg from Wayland

Wayland is intended as a “simpler replacement for X”, and is getting quite a bit of hype around the Linux community. So much so, that it’s the default in the latest versions of Fedora, GNOME, KDE and others. While Wayland may be the future, it really is in future. At least for Ubuntu 17.10. The […]

Read More

Touchpad stops working after sleep + resume (Fedora 26 on Dell XPS)

After recently upgrading my Dell XPS 13 w/Touchscreen to Fedora 26, the touchpad suddenly stopped working upon resuming from sleep mode. It was reproduced 100% of the time, and required a complete restart in order to get the touchpad working again. There have been several forum posts and bug reports regarding others experiencing these exact […]

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 *

Twitter: kireguy

Tweeter button Facebook button Myspace button