macOS Mojave 10.14.5 WEB: 自帶的 apache PHP:自帶的 php 7.1
通過了一大圈重裝 apache 和 php 以後,終因而出來了!php
重裝 apache 和 php 的過程分別記錄在了 MacBook 重裝 Apache 和 PHP 7.2 https://blog.csdn.net/u010953609/article/details/96474165 Mac 重裝 Apache 後中文目錄亂碼 https://blog.csdn.net/u010953609/article/details/96479940 macbook 系統 php 版本和 web 的 php 版本不同,brew link php 失敗 https://blog.csdn.net/u010953609/article/details/96480355git
以上 3 個實際上和 php 代碼沒有什麼關係!github
$ brew info gdweb
gd: stable 2.2.5 (bottled), HEAD Graphics library to dynamically manipulate images https://libgd.github.io/ Not installed From: https://mirrors.ustc.edu.cn/homebrew-core.git/Formula/gd.rb ==> Dependencies Required: fontconfig ✘, freetype ✘, jpeg ✘, libpng ✔, libtiff ✘, webp ✘ ==> Options --HEAD Install HEAD version
把以上 打X 的一個一個安裝上!thinkphp
brew install fontconfig brew install freetype brew install jpeg brew install libtiff brew install webpapache
一個一個確認一下windows
brew info freetype brew info jpeg brew info libpng brew info zlibless
zlib: stable 1.2.11 (bottled) [keg-only] General-purpose lossless data-compression library https://zlib.net/ Not installed From: https://mirrors.ustc.edu.cn/homebrew-core.git/Formula/zlib.rb ==> Caveats This formula is keg-only, which means it was not symlinked into /usr/local, because macOS already provides this software and installing another version in parallel can cause all kinds of trouble.
再次安裝 brew install zlibide
發現問題出在 freetype brew install freetype Updating Homebrew... Warning: freetype 2.9.1 is already installed, it's just not linked You can use brew link freetype
to link this version.thinkphp5
brew link freetype
Linking /usr/local/Cellar/freetype/2.9.1... Error: Could not symlink share/aclocal/freetype2.m4 /usr/local/share/aclocal is not writable.
再來 $ sudo chmod -R 777 aclocal $ brew link freetype Linking /usr/local/Cellar/freetype/2.9.1... 8 symlinks created
$ sudo apachectl restart 正覺得一切 ok 的時候,卻絕望的發現一切依然!
這纔有了以上折騰一大圈!重裝 apache!重裝 php!
是否支持 freetype ,光從命令行 php -m 和以上 brew install ,brew info 是不行的!
Mac 系統太頑固了! 系統中的 freetype 不必定就加載到了 apache ! 聽說這是新版內置 apache 纔開始的,之前的版本沒有這個問題!
判斷 WEB 是否支持 freetype,只有這樣子 phpinfo 去查看
以前的圖沒有保存!可是,確實記得,沒有找到 freetype 的影子!