无法在Ubuntu上安装mysqldump

另一位技术人员最近在我们的LAMP服务器上重新安装了我们的mysql,现在我不能再使用mysqldump了。

# mysqldump The program 'mysqldump' is currently not installed. You can install it by typing: apt-get install mysql-client-5.5 

所以我这样做:

 apt-get install mysql-client-5.5 Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: percona-server-server-5.5 : Depends: percona-server-client-5.5 (>= 1:5.5.36-rel34.2-648.precise) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). 

好的,我这样做:

 apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: libterm-readkey-perl mysql-common Use 'apt-get autoremove' to remove them. The following extra packages will be installed: percona-server-client-5.5 The following NEW packages will be installed: percona-server-client-5.5 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. Need to get 0 B/8,371 kB of archives. After this operation, 30.7 MB of additional disk space will be used. Do you want to continue [Y/n]? 

这听起来像是要删除一些MySQL的东西,并安装另一种数据库,但确定“Y”。

 (Reading database ... 67693 files and directories currently installed.) Unpacking percona-server-client-5.5 (from .../percona-server-client-5.5_1%3a5.5.36-rel34.2- 648.precise_i386.deb) ... dpkg: error processing /var/cache/apt/archives/percona-server-client-5.5_1%3a5.5.36-rel34.2- 648.precise_i386.deb (--unpack): trying to overwrite '/usr/bin/mysqlcheck', which is also in package mysql-client-core-5.5 5.5.35- 0ubuntu0.12.04.2 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/percona-server-client-5.5_1%3a5.5.36-rel34.2-648.precise_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1) 

任何人都可以看到这里发生了什么? 有没有办法手动安装mysqldump? 或者甚至可能是另一种制作转储文件的方式?

Percona是一个MySQL fork / alternative,你已经为它configuration和启用了repos。 你有两个select:

1)删除与Percona相关的任何东西,包括回购和安装MySQL。

2)删除任何与MySQL相关的东西并安装Percona。 也许清除aptcaching并执行apt-get更新,以尝试解决您在上一条命令中遇到的问题。