Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew upgrade drops PHP: dyld: Library not loaded: /usr/local/opt/libpsl/lib/libpsl.5.dylib

Today I upgraded Homebrew and this causes PHP versions (7.2 - 7.3) to be dropped. the following error is shown whenever I try to reinstall them:

dyld: Library not loaded: /usr/local/opt/libpsl/lib/libpsl.5.dylib
Referenced from: /usr/local/opt/curl-openssl/bin/curl
Reason: image not found
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "php"
Download failed: https://www.php.net/distributions/php-7.3.9.tar.xz

Any suggestions?

like image 563
Yamen Ashraf Avatar asked Sep 09 '19 09:09

Yamen Ashraf


3 Answers

Okay, I've solved this by installing this library brew install libpsl

then reinstall php brew reinstall [email protected] --build-from-source

also the same for [email protected]

Be aware that reinstalling php will reset all php configurations

like image 82
Yamen Ashraf Avatar answered Oct 31 '22 05:10

Yamen Ashraf


It's a bug after php was migrated to OpenSSH 1.1. There's no need to install libpsl.

The problem has been fixed by pr-44048. You should uninstall libpsl and reinstall php.

brew uninstall libpsl
brew reinstall php
like image 4
Simba Avatar answered Oct 31 '22 06:10

Simba


Removing the Cellar folder and installing the PHP again worked for me.

rm -rf /Users/rafaelgomes/.composer/*
rm -rf /usr/local/Cellar/*
brew doctor ; brew update ; brew upgrade
brew install php
like image 2
Rafael Corrêa Gomes Avatar answered Oct 31 '22 05:10

Rafael Corrêa Gomes