Hướng dẫn no such keg opt/homebrew/cellar/php - không có keg opt / homebrew / tunnel / php

Mô tả lỗi khi tôi chạy bất kỳ lệnh PHP nào Tôi nhận được các lỗi sau: When i run any php command i get the following errors:
When i run any php command i get the following errors:

Nội dung chính ShowShow

  • Cho Php 5.6 & Php 7.0
  • Đến bây giờ, Tap trống và tất cả các công thức của nó được di chuyển sang ╰─$ brew unlink && brew link Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed. Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3 To relink, run: brew unlink && brew link 7
  • Vì vậy, tôi chưa được khai thác và làm sạch
  • Và khai thác repo này cho các phiên bản PHP cũ hơn
  • Và các phiên bản PHP được cài đặt lại

─$ php -v
dyld[3763]: Library not loaded: /opt/homebrew/opt/openldap/lib/libldap-2.5.0.dylib
  Referenced from: /opt/homebrew/Cellar//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]    3763 abort      php -v

Cho đến nay tôi đã thử

╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
9,
╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
0,
╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
1, ________ 10, ________ 11 ...

Điều thú vị là sản phẩm này nêu rõ

╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
2:
╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 

Phiên bản PHP 8.1 8.1
8.1

Có lẽ liên quan đến #674 nhưng bản sửa lỗi cũng không hoạt động.

Tôi đã theo một vài liên kết có cùng trình tự này, cụ thể là ví dụ này. Tôi đã không thể hoàn thành nó thành công. Đây là đầu ra từ thiết bị đầu cuối

MacBook-Pro-4:/ SHennessy$ brew tap homebrew/dupes
MacBook-Pro-4:/ SHennessy$ brew tap homebrew/versions
MacBook-Pro-4:/ SHennessy$ brew tap homebrew/homebrew-php
MacBook-Pro-4:/ SHennessy$ brew unlink php56
Error: No such keg: /usr/local/Cellar/php56
MacBook-Pro-4:/ SHennessy$ brew install php70
==> Installing php70 from homebrew/php
Error: You must `brew link libpng` before homebrew/php/php70 can be installed
MacBook-Pro-4:/ SHennessy$ brew link php70
Error: No such keg: /usr/local/Cellar/php70
MacBook-Pro-4:/ SHennessy$

Nếu bất cứ ai có bất kỳ ý tưởng nào sẽ tuyệt vời, cảm ơn trước.

Đã hỏi ngày 21 tháng 1 năm 2017 lúc 15:15Jan 21, 2017 at 15:15Jan 21, 2017 at 15:15

Tôi đã có ít nhiều vấn đề tương tự khi cài đặt PHP71.

Để giải quyết nó, tôi đã phải xóa

╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
3 bằng cách sử dụng
╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
4 và sau đó:
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php71

Hy vọng nó giúp.

Mọi thứ bây giờ đã lỗi thời

  • Tất cả đã được di chuyển sang
    ╰─$   brew unlink  && brew link 
    Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
    Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
    To relink, run:
      brew unlink  && brew link 
    
    5

Hướng dẫn no such keg opt/homebrew/cellar/php - không có keg opt / homebrew / tunnel / php

Đã trả lời ngày 21 tháng 2 năm 2017 lúc 18:10Feb 21, 2017 at 18:10Feb 21, 2017 at 18:10

1

Đối với MacOS Monterey, tôi đã phải đối mặt với một vấn đề tương tự

╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
6 trong khi chuyển đổi giữa các phiên bản PHP khác nhau

Các bước sau giúp tôi khắc phục vấn đề của mình

Bước 1

Sau khi cài đặt liên kết đầu tiên của PHP, phiên bản cụ thể đó

brew link  //Whatever you installed

Bước 2

Chuyển sang phiên bản PHP khác Sử dụng các lệnh sau

╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
0

Hoặc bạn có thể sử dụng lệnh đơn

╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
1

Đã trả lời ngày 20 tháng 4 lúc 21:41Apr 20 at 21:41Apr 20 at 21:41

AinainAinAin

5721 Huy hiệu vàng5 Huy hiệu bạc15 Huy hiệu đồng1 gold badge5 silver badges15 bronze badges1 gold badge5 silver badges15 bronze badges

1

Cho Php 5.6 & Php 7.0

Vì vậy, tôi chưa được khai thác và làm sạch

Và khai thác repo này cho các phiên bản PHP cũ hơn
╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
9

Và khai thác repo này cho các phiên bản PHP cũ hơn

MacBook-Pro-4:/ SHennessy$ brew tap homebrew/dupes
MacBook-Pro-4:/ SHennessy$ brew tap homebrew/versions
MacBook-Pro-4:/ SHennessy$ brew tap homebrew/homebrew-php
MacBook-Pro-4:/ SHennessy$ brew unlink php56
Error: No such keg: /usr/local/Cellar/php56
MacBook-Pro-4:/ SHennessy$ brew install php70
==> Installing php70 from homebrew/php
Error: You must `brew link libpng` before homebrew/php/php70 can be installed
MacBook-Pro-4:/ SHennessy$ brew link php70
Error: No such keg: /usr/local/Cellar/php70
MacBook-Pro-4:/ SHennessy$
0

Và các phiên bản PHP được cài đặt lại

Cho đến nay tôi đã thử
╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
9,
╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
0,
╰─$   brew unlink  && brew link 
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 0 symlinks removed.
Warning: Already linked: /opt/homebrew/Cellar//8.1.0_3
To relink, run:
  brew unlink  && brew link 
1, ________ 10, ________ 11 ...
MacBook-Pro-4:/ SHennessy$ brew tap homebrew/dupes
MacBook-Pro-4:/ SHennessy$ brew tap homebrew/versions
MacBook-Pro-4:/ SHennessy$ brew tap homebrew/homebrew-php
MacBook-Pro-4:/ SHennessy$ brew unlink php56
Error: No such keg: /usr/local/Cellar/php56
MacBook-Pro-4:/ SHennessy$ brew install php70
==> Installing php70 from homebrew/php
Error: You must `brew link libpng` before homebrew/php/php70 can be installed
MacBook-Pro-4:/ SHennessy$ brew link php70
Error: No such keg: /usr/local/Cellar/php70
MacBook-Pro-4:/ SHennessy$
1

Điều thú vị là sản phẩm này nêu rõ Jul 2, 2019 at 10:36