Mac 使用 brew 安装 PHP@7.2 为啥需要依赖 python3

MacBook-Pro:~ ling$ brew install php@7.2
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from a18867834 to 01bd14be6.
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
glib ✔ exploitdb packer rke tomcat-native
dmd fn passenger roswell ucloud
eslint lmod pulumi syncthing

==> Installing dependencies for php@7.2: gdbm, xz, python and glib

为啥需要依赖 python ??

《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 1

因为brew下面的php默认编译的是全扩展,这样会导致扩展本身又去依赖别的库,比如gd依赖libpng,event依赖libevent,等等,php依赖glib,glib依赖py,py又依赖gdbm和sqlite,openssl等等。。。。所以php@7.4依赖如下:apr apr-util argon2 aspell autoconf brotli c-ares curl-openssl fontconfig freetds freetype gd gdbm gettext glib gmp icu4c jansson jemalloc jpeg krb5 libev libevent libffi libidn libmetalink libpng libpq libsodium libssh2 libtiff libtool libzip nghttp2 oniguruma openldap openssl@1.1 pcre pcre2 python@3.9 readline rtmpdump sqlite tidy-html5 unixodbc webp xz zstd 所以如果想干净整洁,还是docker装centos,然后自行configure编译指定扩展吧,不然就得忍受这将近50个的依赖

3年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!