我正在尝试在Mac上安装最新版本的PHP。我试过了brew install php72 --force然后想要检查版本,但出现此错误localhost:regagents davea$ php --versiondyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib Referenced from: /usr/local/Cellar/php72/7.2.1_12/bin/php Reason: image not foundAbort trap: 6所以我想我可以重新安装readline,所以我想... localhost:regagents davea$ brew reinstall readline==> Reinstalling readline ==> Downloading https://homebrew.bintray.com/bottles/readline-8.0.0.high_sierra.bottle.tar.gzAlready downloaded: /Users/davea/Library/Caches/Homebrew/downloads/c0566e677ba9f92c270590e2d8132f95668817a7817d2ee47711ff3c2ff045d6--readline-8.0.0.high_sierra.bottle.tar.gz==> Pouring readline-8.0.0.high_sierra.bottle.tar.gz==> Caveatsreadline is keg-only, which means it was not symlinked into /usr/local,because macOS provides the BSD libedit library, which shadows libreadline.In order to prevent conflicts when programs look for libreadline we aredefaulting this GNU Readline installation to keg-only.For compilers to find readline you may need to set: export LDFLAGS="-L/usr/local/opt/readline/lib" export CPPFLAGS="-I/usr/local/opt/readline/include"For pkg-config to find readline you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"==> Summary? /usr/local/Cellar/readline/8.0.0: 48 files, 1.5MB但是然后运行“ php -version”会给我同样的错误。是什么赋予了?如何在Mac上安装和运行php?
1 回答
隔江千里
TA贡献1906条经验 获得超10个赞
您的较早版本的php与readline 7链接在一起。您具有readline8。更新php:php72
自制软件中的软件包的最新版本为7.2.17_1。
brew update brew upgrade php72
可从php
软件包中获取php 7.3.4 。要安装最新版本的php:
brew install php
- 1 回答
- 0 关注
- 202 浏览
添加回答
举报
0/150
提交
取消