1. 설치
$ brew upgrade php@7.4
==> Downloading https://www.freetds.org/files/stable/freetds-1.3.10.tar.gz
Error: php@7.4: Failed to download resource "freetds"
Download failed: Homebrew-installed `curl` is not installed for: https://www.freetds.org/files/stable/freetds-1.3.10.tar.gz
Chan-ui-Mac-mini:httpd ds1ttc$ brew install curl
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 1 formula.
Warning: You are using macOS 10
curl 이 설치 안되어 있어서 freetds 가 설치가 안된다.
curl 을 설치
$ brew install curl
다시 php 설치
$ brew upgrade php@7.4
설치 후 php restart
$ brew services restart php@7.4
버전 확인
Chan-ui-Mac-mini:httpd ds1ttc$ php -v
PHP 7.1.33 (cli) (built: Jan 18 2020 13:49:07) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
Chan-ui-Mac-mini:httpd ds1ttc$
여전히 예전 버전이 나옴.
.profile 에 등록해 주자.
$ echo 'export PATH="/usr/local/opt/php@7.4/bin:$PATH"' >> ~/.profile
$ echo 'export PATH="/usr/local/opt/php@7.4/sbin:$PATH"' >> ~/.profile
$ source .profile
다시 버전 확인
Chan-ui-Mac-mini:~ ds1ttc$ php -v
PHP 7.4.29 (cli) (built: Apr 21 2022 07:59:48) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.29, Copyright (c), by Zend Technologies
Chan-ui-Mac-mini:~ ds1ttc$
그래도 예전 버전이 나온다면
터미널을 새로 열어서 해 볼 것.
'PHP' 카테고리의 다른 글
CentOS7 Apache 2.4.6, PHP7.4, MariaDB 10.7 설치 (0) | 2022.04.17 |
---|---|
Codeigniter4 encrypter (0) | 2022.04.16 |
Codeigniter3 to Codeigniter4 마이그레이션 (0) | 2022.04.15 |
Codeigniter4 파일 명명 규칙 (0) | 2022.04.15 |
오늘이 이번 달 몇째 주인지 확인. (0) | 2022.04.15 |