在ubuntu

时间:2016-07-14 04:45:37

标签: mysql linux ubuntu mysqli mysql-error-1064

我试图安装mysql-community-server_5.7.13-1ubuntu16.04_amd64.deb。 在此之前我已经运行了命令 sudo apt-get remove --purge mysql * sudo apt-get autoremove sudo apt-get autoclean

之后我面临以下错误。有谁给我解决方案。

testuser@mon-mod:/usr/mysql$ sudo dpkg -i mysql-community-server_5.7.13-1ubuntu16.04_amd64.deb
(Reading database ... 63795 files and directories currently installed.)
Preparing to unpack mysql-community-server_5.7.13-1ubuntu16.04_amd64.deb ...
.
Unpacking mysql-community-server (5.7.13-1ubuntu16.04) over (5.7.13-1ubuntu16.04) ...
dpkg: dependency problems prevent configuration of mysql-community-server:
 mysql-community-server depends on mysql-common (= 5.7.13-1ubuntu16.04); however:
  Package mysql-common is not installed.
 mysql-community-server depends on mysql-client (= 5.7.13-1ubuntu16.04); however:
  Package mysql-client is not installed.
 mysql-community-server depends on libmecab2 (>= 0.996-1.2ubuntu1); however:
  Package libmecab2 is not installed.
 mysql-community-server depends on libstdc++6 (>= 5.2); however:
  Version of libstdc++6:amd64 on system is 4.8.4-2ubuntu1~14.04.1.
 mysql-community-server depends on init-system-helpers (>= 1.18~); however:
  Version of init-system-helpers on system is 1.14.

dpkg: error processing package mysql-community-server (--install):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 mysql-community-server
testuser@mon-mod:/usr/mysql$

1 个答案:

答案 0 :(得分:0)

您可以在Ubuntu中使用apt-get包管理器来安装MySQL服务器。它会处理依赖关系。在Ubuntu中,您可以使用

sudo apt-get install mysql-server

sudo apt-get install mysql-server-5.7