ubunutu下php安装gd扩展 apt-cache search php-gd 找到想要安装php版本的gd apt-get install php7.2-gd 安装 php -m 安装成功 如果需要重启php 找到php运行方式是apache2还是php-fpm systemctl restart xxx