I've just upgraded to a MacBook with the M1 and when installing php-decimal with pecl install decimal
, I receive the following error:
checking for libmpdec custom path... no
checking for libmpdec library in default path... found in /usr/local/lib
checking for libmpdec headers in default path... found in /usr/local/include
checking for mpd_version in -lmpdec... no
configure: error: Please check your version of libmpdec (2.4+)
ERROR: `/private/tmp/pear/temp/decimal/configure --with-php-config=/Applications/MAMP/bin/php/php8.0.8/bin/php-config' failed
I've used homebrew to install libmpdec brew install mpdecimal
and I can see the files at usr/local/lib
- they are aliases to the homebrew location with these files:
- libmpdec++.a
- libmpdec++.2.5.1.dylib
- libmpdec.a
- libmpdec.2.5.1.dylib
- libmpdec++.dylib
- libmpdec++.3.dylib
- libmpdec.dylib
- libmpdec.3.dylib
I'm just out of ideas here.
My Answer:
It seems like the pecl installer is not able to find the libmpdec library even though it is installed in the default path. One thing you can try is to create a symlink to the libmpdec library in a location where the pecl installer can find it.
You can try the following steps:
1. Open Terminal and navigate to the directory where the libmpdec library is located:
cd /usr/local/lib
2. Create a symlink to the libmpdec library in a location where the pecl installer can find it. For example, you can create a symlink in the /usr/lib directory:
sudo ln -s libmpdec.2.5.1.dylib /usr/lib/libmpdec.2.5.1.dylib
3. Try installing php-decimal again using pecl:
pecl install decimal
This should hopefully resolve the issue and allow the pecl installer to find the libmpdec library. If you continue to encounter issues, you may want to reach out to the php-decimal project or the pecl installer for further assistance.
Rate this post
4 of 5 based on 5814 votesComments