1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PHP実行すると dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib のエラーが起きる。

Last updated at Posted at 2019-07-30

NeovimでCoc入れて、PHPの定義元移動試してみたら、下記のようなエラー。

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found

最初Cocかnodeかで起きてるのかと思ってicu4cをアップデートも考えたんだけど、phpが参照元って書いてあるので、phpを叩いてみると同じエラーが起きる。

$ /usr/local/bin/php
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found

何だお前、最近使わなかったけど、動いてなかったんだな……。

$ brew upgrade php
php 7.2.12 -> 7.3.7
==> Upgrading php
==> Installing dependencies for php: apr, openssl, argon2, brotli, c-ares, libidn, libmetalink, libssh2, jansson, libev, libevent, nghttp2, openldap, rtmpdump, curl-openssl, freetds, libpng, freetype, pcre, readline, sqlite, python, glib, libpq, libsodium, libzip, libtiff and webp
==> Installing php dependency: apr
・
・
・
$ /usr/local/bin/php --version
PHP 7.3.7 (cli) (built: Jul  5 2019 12:44:05) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.7, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.7, Copyright (c) 1999-2018, by Zend Technologies

PHP新しくしたら このエラーは 起きなくなった。Cocの定義元移動は後編に続く。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?