Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install PECL modules without the prompts

Tags:

php

pecl

I just installed PHP on Ubuntu Natty from source.

I'm trying to use PECL to install additional modules like APC and Memcache. I'm using something like this:

pecl install apc 

However, I get prompts asking me to confirm things.

How can I use the pecl command to just accept the defaults? I saw something like this on a message board: printf "yes\n" | pecl install pecl_http. However, in the case of APC this would answer yes for things where the default is no (I think).

Thanks in advance.

like image 582
ObiHill Avatar asked Nov 15 '11 18:11

ObiHill


People also ask

What is PECL command?

The pecl command is used to install PECL extensions. The peardev command is a wrapper for the pear command which removes the normal configured memory limit.

Where is PECL installed?

The module will be installed in /usr/lib64/php/modules/ as /usr/lib64/php/modules/uploadprogress.so.


1 Answers

The following code seems to work ok:

printf "\n" | pecl install apc 

You can also replace apc with any other PECL package.

Cheers.

like image 66
ObiHill Avatar answered Oct 12 '22 10:10

ObiHill