我是 ubuntu.i 的新手,已经安装了 phpstorm 并尝试 运行 composer 但它不是 运行ning

I am new to ubuntu.i have installed phpstorm and try to run composer but it's not running

我已经在 ubuntu 14.04 中安装了 phpstorm 当我尝试使用命令 php artisan migrate:

访问数据库时出错
 wwwsabininfonp@wwwsabininfonp-Aspire-E1-471:/opt/lampp/htdocs/fine-arts$ php artisan migrate                                                                                                             
  [PDOException]                                                                                               
  SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)  

当我尝试使用命令 composer update 时出现以下错误:

    Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - gregwar/captcha dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
    - gregwar/captcha dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
    - Installation request for gregwar/captcha dev-master -> satisfiable by gregwar/captcha[dev-master].

不知道为什么这段代码在骂我.....

错误表明您需要 PHP 的 "gd" 扩展名。您应该能够像这样安装它:

sudo apt-get install php5-gd