在已經編譯安裝好php7場景下,install gd庫 with free-type (解決Call to undefined function imagettftext())
install gd with free-type 有free-type才能支持php的imagettftext()圖片處理函式
cd /root/php7/php-7.2.31/ext/gd #進入安裝源檔案的gd擴展檔案
./configure --with-php-config=/usr/local/php746/bin/php-config --with-freetype-dir=/usr/include/freetype2 #注意要寫對該已經安裝的freetype地址,本地址是centos6.5地址,可以用yum install freetype安裝
make
make test 查看make是否有錯誤 經測驗有時候雖然有報錯,看看錯誤內容,如果影響不大,繼續執行make install也是可以執行成功的,只是報錯中涉及到的部分內容可能無法支持
make install
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/61703.html
標籤:Linux
