Installing the GD library is actually just one command:
sudo apt-get install php5-gd
In addition, use this method to open apache's rewrite:
sudo a2enmod rewrite vi /etc/apache2/sites-enabled/000-default
(I want to reiterate here that the 000-default file is no longer visible in the new version, you can start this module by direct command)
Change all AllowOverride None to AllowOverride All
sudo apache2ctl restart
Be sure to pay attention when installing the mcrypt module,
sudo apt-get install php5-mcrypt
out of the installation of this, but also to install
libmcrypt-dev php5-mcrypt libmcrypt4
can not be less
install curl
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl