0
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.

Mac(Mojave)のphpenvでPHPがインストールできない時のメモ

Posted at

MacのphpenvでPHPをインストールしようとしたところで

configure: error: Cannot find libz 

と表示され、それが解決できずにハマったので解決した時のメモ。
phpenvのインストール方法は多数紹介されているの省略します。

まずは、以下のコマンドをターミナル上で叩き、xcode-selectをインストールします。

sudo xcode-select --install

次に、以下のコマンドをターミナル上で叩き、macOS SDK headerをインストールします。

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

これで解決するはず。
xcode-selectにMojave用のmacOS SDK headerが入っていないのが原因とのこと。
2日もハマってしまった・・・。

参考

以下の記事で解決しました。ありがとうございます!
https://qiita.com/zreactor/items/c3fd04417e0d61af0afe

0
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
0
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?