开发者

Install ImageMagick for XAMPP on Mac

I'm using xampp to do some localhost tests of my PHP projects, but just realized that I'm missing the Imagick package. I've searched around and cannot find a set of instructions (dumbed down to my level) to install ImageMagick.

I followed a tutorial involving MacPorts only to find out later that you can install it via PECL within xampp (whatever that mea开发者_JAVA技巧ns).

    cd /Applications/xampp/xamppfiles/bin/
    pecl download imagick

Running the above resulted in:

    invalid package name/package file "imagick"
    download failed

I'm a web coder with embarrassingly ZERO server-type skills. Any help is MUCH appreciated. I think I read something about needing the devel version of xampp. Could that be my problem? And how would I know if that's what I've got?

Mac Verion 10.6.7 Xampp version 1.7.3


What are the results of executing

$ pecl search imagick

I just downloaded XAMPP to test this, and had the following results:

mlambie@destro:/Applications/XAMPP/xamppfiles/bin$ ./pecl search imagick
Retrieving data...0%
Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
imagick 3.1.0b1 (beta)        Provides a wrapper to the ImageMagick library.

Note that whilst pecl can see the package, attempting to install it with $ pecl install imagick failed with the following error:

ERROR: `/Applications/XAMPP/xamppfiles/temp/pear/temp/imagick/configure --with-imagick' failed

This is because I do not have the ImageMagick libraries installed on my machine. I rectified that with:

$ brew install imagemagick

(I use homebrew instead of MacPorts to manage this kind of thing).

I was still missing the PHP headers, which I installed using the XAMPP Developer Package. I downloaded and installed this from the same location where I downloaded XAMPP from. Note that the Developer Package is a separate DMG entirely.

Once that was done, I successfully compiled the module with:

$ pecl install imagick

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜