Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 78928 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.7.23-1ubuntu14.04_amd64.deb ...
Unpacking mysql-common (5.7.23-1ubuntu14.04) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack .../mysql-community-client_5.7.23-1ubuntu14.04_amd64.deb ...
Unpacking mysql-community-client (5.7.23-1ubuntu14.04) ...
Selecting previously unselected package mysql-client.
Preparing to unpack .../mysql-client_5.7.23-1ubuntu14.04_amd64.deb ...
Unpacking mysql-client (5.7.23-1ubuntu14.04) ...
Selecting previously unselected package mysql-community-server.
Preparing to unpack .../mysql-community-server_5.7.23-1ubuntu14.04_amd64.deb ...
Unpacking mysql-community-server (5.7.23-1ubuntu14.04) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.23-1ubuntu14.04_amd64.deb ...
Unpacking mysql-server (5.7.23-1ubuntu14.04) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up mysql-common (5.7.23-1ubuntu14.04) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up mysql-community-client (5.7.23-1ubuntu14.04) ...
Setting up mysql-client (5.7.23-1ubuntu14.04) ...
Setting up mysql-community-server (5.7.23-1ubuntu14.04) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
mysqld: Can't read dir of '/etc/mysql/mysql.conf.d/' (Errcode: 13 - Permission denied)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
dpkg: error processing package mysql-community-server (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-community-server (= 5.7.23-1ubuntu14.04); however:
Package mysql-community-server is not configured yet.dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for ureadahead (0.100.0-16) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-community-server
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)公司服务器上面安装就报这个错,换到自己服务器相同的环境,安装一切正常,实在是头大,搞不定了。
来个大神给看看
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 78928 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.7.23-1ubuntu14.04_amd64.deb ...
Unpacking mysql-common (5.7.23-1ubuntu14.04) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack .../mysql-community-client_5.7.23-1ubuntu14.04_amd64.deb ...
Unpacking mysql-community-client (5.7.23-1ubuntu14.04) ...
Selecting previously unselected package mysql-client.
Preparing to unpack .../mysql-client_5.7.23-1ubuntu14.04_amd64.deb ...
Unpacking mysql-client (5.7.23-1ubuntu14.04) ...
Selecting previously unselected package mysql-community-server.
Preparing to unpack .../mysql-community-server_5.7.23-1ubuntu14.04_amd64.deb ...
Unpacking mysql-community-server (5.7.23-1ubuntu14.04) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.23-1ubuntu14.04_amd64.deb ...
Unpacking mysql-server (5.7.23-1ubuntu14.04) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up mysql-common (5.7.23-1ubuntu14.04) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up mysql-community-client (5.7.23-1ubuntu14.04) ...
Setting up mysql-client (5.7.23-1ubuntu14.04) ...
Setting up mysql-community-server (5.7.23-1ubuntu14.04) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
mysqld: Can't read dir of '/etc/mysql/mysql.conf.d/' (Errcode: 13 - Permission denied)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
dpkg: error processing package mysql-community-server (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-community-server (= 5.7.23-1ubuntu14.04); however:
Package mysql-community-server is not configured yet.dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for ureadahead (0.100.0-16) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-community-server
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)公司服务器上面安装就报这个错,换到自己服务器相同的环境,安装一切正常,实在是头大,搞不定了。
来个大神给看看
Setting up mysql-community-server (5.7.24-1ubuntu14.04) ...
mysqld: Can't read dir of '/etc/mysql/mysql.conf.d/' (Errcode: 13 - Permission denied)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
头大啊
依照你的錯誤訊息,看起來可能是你用了 dpkg 直接安裝,但是帳號沒有使用 sudo 提高權限吧?
檢查一下帳號是否已加入 sudo 群組或者直接使用 root 帳號安裝我想這樣安裝後,apt 或 dpkg 並未完成初始化的設定,你用起來應該會怪怪的....
建議重新執行安裝一次$ sudo aptitude purge mysql-community-client
$ sudo aptitude purge mysql-community-server
$ sudo aptitude purge mysql-client然後重新使用 aptitude install