但是我在尝试安装mysql-server / mysql-server-5.6时遇到错误。
我得到以下输出:
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.6 (5.6.27-0ubuntu0.14.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: error processing package mysql-server-5.6 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.6; however:
Package mysql-server-5.6 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.6
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
整晚寻找解决方案(已经有5个小时),但无法弄明白。我在这里尝试了很多东西。
我是如何首次安装php7的: - https://bjornjohansen.no/upgrade-to-php7
我试过的解决方案:
https://askubuntu.com/questions/384234/e-mysql-server-5-5-installation-error
https://askubuntu.com/questions/292865/upgrade-mysql-server-issue
以某种方式设法得到此错误(不再是): - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
尝试了许多我甚至无法记住的事情
答案 0 :(得分:0)
您可以解决运行此命令的问题
sudo apt-get install php-mysql
答案 1 :(得分:0)
试试这个(php5):
sudo apt-get install php 5-mysql
sudo apt-get update
或者这个(php 7):
sudo apt update
sudo apt install php7.0-fpm php7.0-mysql
然后您可能需要重新启动您的网络服务器。 E.g:
sudo service apache2 restart