我尝试过按照几篇文章做,并且花了几个小时寻找解决方案,但无法在 Ubuntu 20.04 上安装任何版本的 mysql。
我目前收到以下错误:
Unpacking mysql-community-server (5.7.33-1ubuntu18.04) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.33-1ubuntu18.04_amd64.deb ...
Unpacking mysql-server (5.7.33-1ubuntu18.04) ...
Setting up libmecab2:amd64 (0.996-10build1) ...
Setting up mysql-community-server (5.7.33-1ubuntu18.04) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my .cnf) in auto mode
my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!
my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!
my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!
my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or directory)
my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!
mysqld: Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2 - No such file or dir ectory)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
dpkg: error processing package mysql-community-server (--configure):
installed mysql-community-server package post-installation script subprocess re turned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-community-server (= 5.7.33-1ubuntu18.04); however :
Package mysql-community-server is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup erro r from a previous failure.
Processing triggers for systemd (245.4-4ubuntu3.3) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
Errors were encountered while processing:
mysql-community-server
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
除了如何实际安装之外,我已经尝试了所有方法。如有任何帮助,不胜感激