AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1063076
Accepted
Houman
Houman
Asked: 2021-05-10 23:46:50 +0800 CST2021-05-10 23:46:50 +0800 CST 2021-05-10 23:46:50 +0800 CST

不能再在新的 Debian 服务器上安装 mysql 8(尚未配置包 mysql-community-server。)

  • 772

直到几周前,我才能够在全新的 Debian Buster 安装上安装 mysql server 8。

sudo apt update
export DEBIAN_FRONTEND=noninteractive
sudo apt full-upgrade -y
sudo apt autoremove -y

sudo apt install gnupg -y
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.17-1_all.deb
sudo -E dpkg -i mysql-apt-config_0.8.17-1_all.deb
sudo apt update
sudo -E apt install -y mysql-server

但是某些东西似乎已经发生了变化,Debian Buster 10.9或者mysql-apt-config_0.8.17-1_all.deb导致了下面的错误。

错误:

update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up mysql-community-client (8.0.24-1debian10) ...
Setting up mysql-client (8.0.24-1debian10) ...
Setting up mysql-community-server (8.0.24-1debian10) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
dpkg: error processing package mysql-community-server (--configure):
 installed mysql-community-server package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-community-server (= 8.0.24-1debian10); however:
  Package mysql-community-server is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
Errors were encountered while processing:
 mysql-community-server
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

我完全被卡住了,因为我不明白错误消息。因为配置应该在安装后发生,如下所示:

sudo systemctl start mysql.service
sudo systemctl enable mysql.service
SECURE_MYSQL=$(expect -c "
set timeout 10
spawn sudo mysql_secure_installation
expect \"Would you like to setup VALIDATE PASSWORD plugin?\"
send \"n\r\"
expect \"New password:\"
send \"$DB_ROOT_PASSWORD\r\"
expect \"Re-enter new password:\"
send \"$DB_ROOT_PASSWORD\r\"
expect \"Remove anonymous users?\"
send \"y\r\"
expect \"Disallow root login remotely?\"
send \"y\r\"
expect \"Remove test database and access to it?\"
send \"y\r\"
expect \"Reload privilege tables now?\"
send \"y\r\"
expect eof
")
echo "$SECURE_MYSQL"

请问我错过了什么?

更新:

根据评论,这是我调查的结果:

sudo bash -x /var/lib/dpkg/info/mysql-community-server.postinst
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/mysql-community-server.postinst
Use of uninitialized value $action in string eq at /usr/share/debconf/frontend line 27.

vim /usr/share/debconf/前端

#!/usr/bin/perl -w
# This file was preprocessed, do not edit!


use strict;
use Debconf::Db;
use Debconf::Template;
use Debconf::AutoSelect qw(:all);
use Debconf::Log qw(:all);

Debconf::Db->load;

debug developer => "frontend started";

my $frontend=make_frontend();

shift @ARGV if $ARGV[0] eq '--';

my $package;
my $no_title=0;
if ($ENV{DEBCONF_PACKAGE}) {
        $package=$ENV{DEBCONF_PACKAGE};
}
elsif ($ARGV[0]=~m!^.*/(.*?)\.(?:postinst|postrm|prerm)$!) {
        $package=$1;
        my $action=$ARGV[1];
        $no_title=1 if $action eq 'triggered';
}
mysql debian
  • 1 1 个回答
  • 348 Views

1 个回答

  • Voted
  1. Best Answer
    Houman
    2021-05-11T00:18:40+08:002021-05-11T00:18:40+08:00

    我找到了原因。错误消息是一条红鲱鱼。

    我试图将它安装在 AWS t3.nano 实例上,而 512 MB RAM 对 mysql8 来说是不够的。

    我刚刚将它重新安装在具有 1 GB 内存的 t3.micro 上,并且脚本安装完美。

    我希望这对其他人有帮助。谢谢

    • 1

相关问题

  • 开源与专有关系 db mgt 系统的优缺点是什么?

  • 在 solaris 10 上为 mysql 设置 max_allowed_pa​​cket

  • 如何移动 MySQL 的数据目录?

  • 通过 VPN 连接什么是远程服务器 IP?

  • mysql崩溃

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve