Git Product home page Git Product logo

Comments (7)

shivammathur avatar shivammathur commented on May 13, 2024 2

ok, you had the old [email protected], package

Please run

sudo rm -rf /opt/homebrew/Cellar/[email protected]/8.1.0_3
brew unlink php
brew link php
# Then check
php -v

from homebrew-php.

shivammathur avatar shivammathur commented on May 13, 2024

@dyanakiev

Duplicate #674

Openldap has been updated to 2.6.0 and all the PHP versions have been re-built with the new version.

Run brew update and then reinstall the PHP version.

For example for PHP 8.1

brew update
brew reinstall shivammathur/php/[email protected]
brew unlink [email protected]
brew link --force --overwrite [email protected]

from homebrew-php.

dyanakiev avatar dyanakiev commented on May 13, 2024

@shivammathur thanks i just tried that:

Last login: Thu Nov 25 22:56:13 on ttys000
╭─dimitar@Dimitars-MacBook ~
╰─$ brew update
brew reinstall shivammathur/php/[email protected]
brew unlink [email protected]
brew link --force --overwrite [email protected]
Already up-to-date.
==> Downloading https://ghcr.io/v2/shivammathur/php/php/manifests/8.1.0_1
Already downloaded: /Users/dimitar/Library/Caches/Homebrew/downloads/9d0caebf87ea0030c673b504558200a92f348f92f8158f03b41acb2bae861bdf--php-8.1.0_1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/shivammathur/php/php/blobs/sha256:02043cd1397
Already downloaded: /Users/dimitar/Library/Caches/Homebrew/downloads/5479673f07fa684f37e531ad207d27841feed60b24d4ef31249fdb2957179de8--php--8.1.0_1.arm64_big_sur.bottle.tar.gz
==> Reinstalling shivammathur/php/php
==> Pouring php--8.1.0_1.arm64_big_sur.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /opt/homebrew
Could not symlink bin/pear
Target /opt/homebrew/bin/pear
is a symlink belonging to [email protected]. You can unlink it:
  brew unlink [email protected]

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

To list all files that would be deleted:
  brew link --overwrite --dry-run php

Possible conflicting files are:
/opt/homebrew/bin/pear -> /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/pear
/opt/homebrew/bin/peardev -> /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/peardev
/opt/homebrew/bin/pecl -> /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/pecl
/opt/homebrew/bin/phar -> /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/phar
/opt/homebrew/bin/phar.phar -> /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/phar.phar
/opt/homebrew/bin/php -> /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/php
/opt/homebrew/bin/php-cgi -> /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/php-cgi
/opt/homebrew/bin/php-config -> /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/php-config
/opt/homebrew/bin/phpdbg -> /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/phpdbg
/opt/homebrew/bin/phpize -> /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/phpize
/opt/homebrew/sbin/php-fpm -> /opt/homebrew/Cellar/[email protected]/8.1.0_3/sbin/php-fpm
Error: Could not symlink include/php/TSRM/TSRM.h
Target /opt/homebrew/include/php/TSRM/TSRM.h
is a symlink belonging to [email protected]. You can unlink it:
  brew unlink [email protected]

To force the link and overwrite all conflicting files:
  brew link --overwrite [email protected]

To list all files that would be deleted:
  brew link --overwrite --dry-run [email protected]
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar/[email protected]/8.1.0_3
To relink, run:
  brew unlink [email protected] && brew link [email protected]
╭─dimitar@Dimitars-MacBook ~
╰─$ php -v
dyld[5375]: Library not loaded: /opt/homebrew/opt/openldap/lib/libldap-2.5.0.dylib
  Referenced from: /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/php
  Reason: tried: '/opt/homebrew/opt/openldap/lib/libldap-2.5.0.dylib' (no such file), '/usr/local/lib/libldap-2.5.0.dylib' (no such file), '/usr/lib/libldap-2.5.0.dylib' (no such file), '/opt/homebrew/Cellar/openldap/2.6.0/lib/libldap-2.5.0.dylib' (no such file), '/usr/local/lib/libldap-2.5.0.dylib' (no such file), '/usr/lib/libldap-2.5.0.dylib' (no such file)
[1]    5375 abort      php -v
╭─dimitar@Dimitars-MacBook ~
╰─$ zsh                                                                                                                            134 ↵
╭─dimitar@Dimitars-MacBook ~
╰─$ pvp -v
╭─dimitar@Dimitars-MacBook ~
╰─$ php -v                                                                                                                         130 ↵
dyld[5615]: Library not loaded: /opt/homebrew/opt/openldap/lib/libldap-2.5.0.dylib
  Referenced from: /opt/homebrew/Cellar/[email protected]/8.1.0_3/bin/php
  Reason: tried: '/opt/homebrew/opt/openldap/lib/libldap-2.5.0.dylib' (no such file), '/usr/local/lib/libldap-2.5.0.dylib' (no such file), '/usr/lib/libldap-2.5.0.dylib' (no such file), '/opt/homebrew/Cellar/openldap/2.6.0/lib/libldap-2.5.0.dylib' (no such file), '/usr/local/lib/libldap-2.5.0.dylib' (no such file), '/usr/lib/libldap-2.5.0.dylib' (no such file)
[1]    5615 abort      php -v
╭─dimitar@Dimitars-MacBook ~
╰─$                                                                                                                                134 ↵

from homebrew-php.

dyanakiev avatar dyanakiev commented on May 13, 2024

Well.. what solved my issue was:

brew link php - with is weird..
then brew reinstall shivammathur/php/[email protected]

and everything is working

from homebrew-php.

dyanakiev avatar dyanakiev commented on May 13, 2024

@shivammathur still i get some issues... apperently i cant link [email protected]

Last login: Thu Nov 25 23:12:33 on ttys003
╭─dimitar@Dimitars-MacBook ~
╰─$ php -v
zsh: command not found: php
╭─dimitar@Dimitars-MacBook ~
╰─$   brew unlink [email protected] && brew link [email protected]                            127 ↵
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar/[email protected]/8.1.0_3
To relink, run:
  brew unlink [email protected] && brew link [email protected]
╭─dimitar@Dimitars-MacBook ~
╰─$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  php
╭─dimitar@Dimitars-MacBook ~
╰─$ php -v                                                                  1 ↵
zsh: command not found: php
╭─dimitar@Dimitars-MacBook ~
╰─$                                                                                                            127 ↵

from homebrew-php.

sjerdo avatar sjerdo commented on May 13, 2024

Unfortunately, I experienced the same error.

For me it was fixed after I unlinked and uninstalled all php versions with brew and after that reinstalled all php versions I need

from homebrew-php.

dyanakiev avatar dyanakiev commented on May 13, 2024

@sjerdo i still have some issues with linking/unlinking and i dont understand why.. i will probably purge homebrew and install again..

from homebrew-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.