Yii2 Require FreeType Support And PNG Support Error

 ·  · 

After setting up a new Ubuntu vagrant box for my Yii2 development, I met following error:

Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required.


At last I fixed it by installing php5-gd and libfreetype6-dev on Ubuntu.

$ sudo apt-get install php5-gd
$ sudo apt-get install libfreetype6-dev