Php – Install a pecl package (gmagick) without PHPize

debiandebian-wheezypeclPHP

I am running Debian Wheezy with PHP5.5 (not the default PHP version of Wheezy).

I want to install gmagick (already installed graphicsmagick from aptitude). So I did this command line :

pecl install gmagick-beta

And here is the error

Starting to download gmagick-1.1.7RC2.tgz (97,556 bytes)
......................done: 97,556 bytes
10 source files, building
running: phpize
sh: phpize: command not found
If the command failed with 'phpize: not found' then you need to install php5-dev packageYou can do it by running 'apt-get install php5-dev' as a root user
ERROR: `phpize' failed

So I looked into php5-dev and saw that by installing php5-dev, my current installation of PHP5.5 will be "upgraded". How is this even possible as this is the latest not even available from the official branch of Debian… I don't feel like installing php5-dev (I don't want the server to fail in case of upgrade conflicts/problems)

Anyway, I just want to install that pecl package without phpize.

Is this possible ?

Best Answer

Why don't you take a look at http://www.dev-metal.com/setup-latest-version-php-5-5-debian-wheezy-7-07-1-fix-gpg-key-error/

Then you are using a PHP version from the repositories, which is always a better idea. You can then also install the php-dev package.

Do note the warning about the Apache upgrade.

In short:

Add these lines to your /etc/apt/sources.list

deb http://packages.dotdeb.org wheezy-php55 all
deb-src http://packages.dotdeb.org wheezy-php55 all

To get over the verified sources error:

gpg --keyserver packages.dotdeb.org --recv-key  E9C74FEEA2098A6E
gpg -a --export E9C74FEEA2098A6E | sudo apt-key add -

After that:

apt-get update
apt-get install php5 php5-dev