Installing PHP Enchant using PECL on XAMPP on OS X Lion

984 Views Asked by At

I am trying to install the PHP enchant library using PECL, but I'm getting "error: Cannot find enchant" even though I have already installed the core enchant executable using Macports. I can even use enchant on the command line. Yet, it seems that PECL cannot find the installation.

During the installation process with PECL, there's an interactive question that appears asking "lib enchant prefix? [shared]", and then waits for my input. I don't really know what this means, but I'm assuming it is asking for the directory where the core enchant executable is installed. In my case, it is in /opt/local/bin. If it asking where the enchant library files are, it is in /opt/local/lib. I have tried to enter both of these paths during this question, and it still produces the same "Cannot find enchant" error.

I don't understand what's going on here. I have PHP 5.3.1, and I am using XAMPP. On the PHP Manual for enchant, it says it comes preinstalled on PHP versions greater than 5.3.0, yet it did not come installed on mine for some reason. Maybe because I installed it via XAMPP?

1

There are 1 best solutions below

0
On

I had the same issue, use /opt/local as enchant prefix and hopefully it'll work