0
1

More than 3 years have passed since last update.

homebewでPHPをインストールしたときに'Error: python@3.9: the bottle needs the Apple Command Line Tools to be installed'

Posted at

PHPを仕事で使うことになったので早速自分のPCにインストールしようとしたときに謎のエラーで若干詰まった話

エラーの内容

下記のようにインストールをしようとした結果

brew install php@7.4

下記のエラー・・・

Error: python@3.9: the bottle needs the Apple Command Line Tools to be installed.
  You can install them, if desired, with:
    xcode-select --install

You can try to install from source with:
  brew install --build-from-source python@3.9
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels.

要するに、「Command Line tool(xCode)が入ってないぜ。」ということなそうな。

いろいろ調べていくと、OSをアップグレードしたらCommand Line toolを再インストールする必要があるみたいですね〜

その後、macに標準装備されているPHPからローカルにインストールしたものにパスを設定し直し・・・(パスの設定の参考記事:https://qiita.com/kuroro_ru/items/046cba8e23d32599ee4a)

$ php -v
PHP 7.4.18 (cli) (built: Apr 30 2021 09:57:43) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.18, Copyright (c), by Zend Technologies

無事インストールできました。
解決!!

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