-1

The error I would get would be something like this. Basically all forms of dyld: Library not loaded

➜ php -v
dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.4.2.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
[1]    62677 abort      php -v

~/Projects 
➜ valet use php@8.0

dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.4.2.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.4.2.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.4.2.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.4.2.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.4.2.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
/Users/UserPerson/.composer/vendor/bin/valet: line 89: 63162 Abort trap: 6           php "$DIR/cli/valet.php" "$@"

dustbuster
  • 79,958
  • 7
  • 21
  • 41

1 Answers1

0

Super simple to fix, but I don't think this question had been answered in its complete form on Stack Overflow.

These 4 commands will get you your composer back!

brew uninstall --ignore-dependencies node icu4c
brew install node
brew link --overwrite node
brew upgrade

// Then install php 8 and a new laravel as a test!

composer create-project laravel/laravel funProject
Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
dustbuster
  • 79,958
  • 7
  • 21
  • 41
  • 1
    Can you share more details? How should any node package be related to the given PHP problem which mentions any problem with an LDAP library? – Nico Haase Jun 30 '21 at 07:28