PHP Composer not working on Mac

I installed bitnami mac stack mainly because my project requires at least PHP version 5.4.7. However, I had a problem with the composer. This is the error I get on startup:

php composer.phar install --dev 

Error:

 Richard-Knops-MacBook-Pro:my-project richardknop$ php composer.phar install --dev dyld: Library not loaded: /Applications/MAMP/Library/lib/libiconv.2.dylib Referenced from: /opt/local/bin/php Reason: Incompatible library version: php requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0 Trace/BPT trap Richard-Knops-MacBook-Pro:my-project richardknop$ 

How to solve it?

+4
source share
2 answers

Update your installation mom, the error clearly indicates that your libiconv.2.dylib is out of date.

If MAMP does not have a more modern version, install apache + php through. MAC ports

+1
source

BitNami is standalone and does not change your system environment. I think the problem is that the BitNami environment was not loaded.

Link to: / opt / local / bin / php

This is not like installing BitNami. For future reference, the solution (I think) would be as follows:

  • Download the BitNami environment running /Application/mampstack-5.4.x/use_mampstack
  • After that, make sure the environment is loaded correctly by running which php
  • Then do php composer.phar install --dev
+1
source

All Articles