problem description
Ubuntu 16.04 errors are reported when installing the MySQL server and MySQL client. In order to make the description as simple as possible, take MySQL client as an example:
$ sudo apt install mysql-client
## ubuntu 16.04 It is recommended to use apt for all operations
## Omit a bunch of prompts and go straight to the error message
...
Unselected package mysql-client is being selected.
(The database is being read ... The system currently has 277491 files and directories installed.)
Preparing to unpack ... /mysql-client_5.7.15-0ubuntu0.16.04.1_all.deb ...
Unpacking mysql-client (5.7.15-0ubuntu0.16.04.1) ...
Setting up mysql-common (5.7.15-0ubuntu0.16.04.1) ...
update-alternatives: error: candidate path /etc/mysql/my.cnf.fallback does not exist
dpkg: Error processing package mysql-common (--configure).
Subprocess installed post-installation script returned error status 2
dpkg: Dependency issues prevented the configuration of libmysqlclient20:amd64 from continuing.
libmysqlclient20:amd64 depends on mysql-common (>= 5.5); however.
Package mysql-common has not been configured.
dpkg: Error processing package libmysqlclient20:amd64 (--configure).
Dependency issue - still not configured
dpkg: Dependency problem preventing configuration of libmysqlclient-dev from continuing.
libmysqlclient-dev depends on libmysqlclient20 (= 5.7.15-0ubuntu0.16.04.1); however.
Package libmysqlclient20:amd64 is not yet configured.
dpkg: Error processing package libmysqlclient-dev (--configure).
Dependency issue - still not configured
dpkg: Dependency issue preventing mysql-client-5.7 configuration from continuing.
mysql-client-5.7 depends on mysql-common (>= 5.5); however.
Package mysql-common has not been configured.
dpkg: Error processing package mysql-client-5.7 (--configure).
Dependency issue - still not configured
dpkg: Dependency issue preventing mysql-client configuration from continuing.
mysql-client � The apport report was not written because the error message indicated that this was an error due to a previous issue.
No apport report was written because the error message indicated that this was an error due to a previous issue.
The apport report was not written because the MaxReports limit was reached.
The apport report was not written because the MaxReports limit was reached.
Relies on mysql-client-5.7; however.
Package mysql-client-5.7 has not been configured.
dpkg: Error processing package mysql-client (--configure).
Dependency issue - still not configured
An error occurred while processing.
mysql-common
libmysqlclient20:amd64
libmysqlclient-dev
mysql-client-5.7
mysql-client
E: Sub-process /usr/bin/dpkg returned an error code (1)
Error reporting focuses on:
update-alternatives: Error: candidate path /etc/mysql/my.cnf.fallback does not exist
dpkg: Error while processing package mysql-common (--configure).
Error information in English version:
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist dpkg: error processing package mysql-common (--configure):
solution:
mkdir MYSQL
cd MYSQL
sudo apt download mysql-common
ar xvf mysql*
tar xvf dat*
sudo cp ./etc/mysql/my.cnf.fallback /etc/mysql/my.cnf.fallback
sudo dpkg -i mysql*deb
cd
sudo apt -f install
Note:
1. If there is no/etc/mysql
This file is truncated to create yourself
2.If version < Ubuntu
Similar Posts:
- [Solved] libmysqlclient.so.16: cannot open shared object file: No such file or directory Error
- Error reporting in Ubuntu apt get upgrade [How to Solve]
- EnvironmentError: mysql_config not found
- [How to Solve] Library not loaded: libmysqlclient.18.dylib
- [Solved] Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by serv
- [Solved] Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by serv
- [Solved] 1146 – Table ‘performance_schema.session_variables’ doesn’t exist
- [Solved] Node Connect MYSQL Error: Client does not support authentication protocol requested by server; consider upgrading MySQL client
- CenterOS7: How to Solve error: No package mysql-server available.
- [How to Solve] ImportError: No module named MySQLdb