docker安裝GD擴展


apt update  #更新軟件源
apt install -y libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev #安裝各種庫
docker-php-source extract #解壓源碼
cd /usr/src/php/ext/gd  #gd源碼文件夾
docker-php-ext-configure gd --with-webp-dir=/usr/include/webp --with-jpeg-dir=/usr/include --with-png-dir=/usr/include --with-freetype-dir=/usr/include/freetype2   #准備編譯
docker-php-ext-install gd   #編譯安裝
php -m | grep gd

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM