Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

warpig's avatar
Level 12

How to fix this Laravel issue?

I tried using laravel new projectName but instead I got this:

dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.5.0.dylib
  Referenced from: /usr/local/opt/[email protected]/bin/php
  Reason: image not found
zsh: abort      laravel new portfolio

Same thing happened when I was in a different directory, but I was trying to install Valet, was able to do the first 2 commands or so but prompted me with the error when I tried to run composer global require laravel/valet

Any help is greatly appreciated!! Thanks.

Ran this brew upgrade but got this at the last line, I don't use Docker anymore so... ignore, remove or what. Error: Permission denied @ apply2files - /usr/local/lib/docker/cli-plugins

0 likes
6 replies
Tray2's avatar

I never use the laravel installer since I don't think it's that much easier to use than just

composer create-project laravel/laravel projectName

warpig's avatar
Level 12

@Tray2 hmmm I get the same message:

dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.5.0.dylib
  Referenced from: /usr/local/opt/[email protected]/bin/php
  Reason: image not found
zsh: abort      composer create-project laravel/laravel projectName
warpig's avatar
Level 12

This worked: https://stackoverflow.com/a/54873233/6078824 Essentially had to run 3 commands:

brew upgrade // for upgrading all packages -- this is the command I used

brew upgrade {package} // for upgrading a specific package

and finally

brew cleanup

I updated the Command Line Tool since I kept seeing it after it updated some packages, that command is: softwareupdate --all --install --force

However, 1 thing in particular that stood out to me and was not able to try was this:

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink /bin/composer
Target /usr/local/bin/composer
already exists. You may want to remove it:
    rm '/usr/local/bin/composer'

To force the link and overwrite all conflicting files:
    brew link --overwrite composer

To list al files that would be deleted:
    brew link --overwrite --dry-run composer

Possible conflicting files are:
/usr/local7bin/composer
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink /bin/node
Target /usr/local/bin/node
already exists. You may want to remove it:
    rm '/usr/local/bin/node'

To force the link and overwrite all conflicting files:
    brew link --overwrite node

To list al files that would be deleted:
    brew link --overwrite --dry-run node

Possible conflicting files are:
/usr/local7bin/node
1 like
Tray2's avatar

I think you have a type-0 in one of the brew config files

/usr/local7bin/node

You have managed to enter a 7 in a path to node instead of a /.

1 like
warpig's avatar
Level 12

@Tray2 sorry but I was just rewriting the message from a picture I had taken before, the actual message written in the terminal was correct, sorry for confusion there! But essentially I only saw that message for Composer and Node..

Please or to participate in this conversation.