我是ubuntu新手。我已经安装了phpstorm并尝试运行composer,但它';他不跑了

我是ubuntu新手。我已经安装了phpstorm并尝试运行composer,但它';他不跑了,php,ubuntu,laravel,migration,laravel-artisan,Php,Ubuntu,Laravel,Migration,Laravel Artisan,我已经在ubuntu 14.04中安装了phpstorm 尝试使用命令php artisan migrate访问数据库时出错: wwwsabininfonp@wwwsabininfonp-Aspire-E1-471:/opt/lampp/htdocs/fine-arts$ php artisan migrate

我已经在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)  
当我尝试使用命令生成器更新时,出现以下错误:

    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

它适用于composer更新,但仍然存在迁移的连接问题。。。谢谢你确定你已经正确安装和配置了MySQL服务器吗?mysql服务器正在运行吗?(您可以通过
sudo服务mysql status
)看到它正在运行。。mysql启动/运行,进程1050