LoginSignup
0
0

More than 1 year has passed since last update.

[AWS_13.1]php -vで「No such file or directory」のエラー

Last updated at Posted at 2022-02-06

環境

MacBook Pro (13-inch, 2016, Four Thunderbolt 3 Ports)
macOS 11.3.1(20E241)
AWS EC2 t2.micro

エラー

# php -v
-bash: /usr/bin/php: No such file or directory

# which php
/usr/bin/which: no php in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)



どうやら[AWS_13]でPHP既存の削除して、新しいバージョンのPHPを有効化したものの、新しいバージョンそのものはダウンロードできていなかったらしい。

PHPをダウンロードして、確認

# amazon-linux-extras install php7.4
(省略)

# php -v
PHP 7.4.15 (cli) (built: Feb 11 2021 17:53:39) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

# which php
/usr/bin/php
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