赞
踩
1.安装brew(国内源):
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
2.M1
芯片安装完成后会出现,终端输入brew
会出现 zsh: command not found: brew
的问题
解决:这是配置项出错,brew
的下载路径在/opt/homebrew/bin
,所以我们要在 根目录创建zshrc
,并写入相关的路径
touch .zshrc
open .zshrc
写入:
path=('/opt/homebrew/bin' $path)
export PATH
3.下载 php,mySql 推荐使用 PhpWebStudy
, 推荐使用阿里的源
报错:
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) Error: php@8.3: Failed to download resource "php@8.3" Download failed: https://ghcr.io/v2/shivammathur/php/php/8.3/blobs/sha256:f429c0d4807e7daa511bec9099f7855cdb245f710b5fcd0a9bde8cdee314846e
解决:将HTTP
版本从2
降级到1.1
后工作,相关的文章
git config --global http.version HTTP/1.1
下载完成后更改回来:
git config --global http.version HTTP/2
Php 第一次配置:
php@8.3 is keg-only, which means it was not symlinked into /opt/homebrew,
because this is an alternate version of another formula.
If you need to have php@8.3 first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/php@8.3/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/opt/homebrew/opt/php@8.3/sbin:$PATH"' >> ~/.zshrc
For compilers to find php@8.3 you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/php@8.3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/php@8.3/include"
To start shivammathur/php/php@8.3 now and restart at login:
brew services start shivammathur/php/php@8.3
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/php@8.3/sbin/php-fpm --nodaemonize
echo 'export PATH="/opt/homebrew/opt/php@8.3/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/opt/homebrew/opt/php@8.3/sbin:$PATH"' >> ~/.zshrc
@蚵仔煎-20231107
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。