在 Centos7 上安装 MySQL(MariaDB)

在 Centos7 上安装 MySQL(MariaDB)

Centos7 新手,尝试使用以下命令安装 MariaDB:

sudo yum install mariadb-server mariadb

它输出的内容如下:

Loaded plugins: fastestmirror, langpacks, rhnplugin
This system is receiving updates from RHN Classic or Red Hat Satellite.
Loading mirror speeds from cached hostfile
Package mariadb-server is obsoleted by MariaDB-server, trying to install MariaDB-server-10.1.5-1.el7.centos.x86_64 instead
Package mariadb is obsoleted by MariaDB-client, trying to install MariaDB-client-10.1.5-1.el7.centos.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-client.x86_64 0:10.1.5-1.el7.centos will be installed
---> Package MariaDB-server.x86_64 0:10.1.5-1.el7.centos will be installed
--> Processing Dependency: perl(Data::Dumper) for package: MariaDB-server-10.1.5-1.el7.centos.x86_64
--> Processing Dependency: perl(DBI) for package: MariaDB-server-10.1.5-1.el7.centos.x86_64
--> Processing Dependency: libjemalloc.so.1()(64bit) for package: MariaDB-server-10.1.5-1.el7.centos.x86_64
--> Running transaction check
---> Package jemalloc.x86_64 0:3.6.0-1.el7 will be installed
---> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
--> Running transaction check
---> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed
--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Running transaction check
---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
---> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed
--> Running transaction check
---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================
 Package           Arch   Version              Repository       Size
=====================================================================
Installing:
 MariaDB-client    x86_64 10.1.5-1.el7.centos  centos7-x86_64-mariadb-10-1
                                                                37 M
 MariaDB-server    x86_64 10.1.5-1.el7.centos  centos7-x86_64-mariadb-10-1
                                                                92 M
Installing for dependencies:
 jemalloc          x86_64 3.6.0-1.el7          centos7-x86_64-mariadb-10-1
                                                               104 k
 perl-Compress-Raw-Bzip2
                   x86_64 2.061-3.el7          centos7-x86_64   32 k
 perl-Compress-Raw-Zlib
                   x86_64 1:2.061-4.el7        centos7-x86_64   57 k
 perl-DBI          x86_64 1.627-4.el7          centos7-x86_64  802 k
 perl-Data-Dumper  x86_64 2.145-3.el7          centos7-x86_64   47 k
 perl-IO-Compress  noarch 2.061-2.el7          centos7-x86_64  260 k
 perl-Net-Daemon   noarch 0.48-5.el7           centos7-x86_64   51 k
 perl-PlRPC        noarch 0.2020-14.el7        centos7-x86_64   36 k

Transaction Summary
=====================================================================
Install  2 Packages (+8 Dependent packages)

Total size: 131 M
Installed size: 557 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/centos7-x86_64-mariadb-10-1/packages/jemalloc-3.6.0-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY


Public key for jemalloc-3.6.0-1.el7.x86_64.rpm is not installed

jemalloc-3.6.0-1.el7.x86_64.rpm无法安装怎么办?我做错了什么?

答案1

您安装了 MariaDB(测试版)的第三方存储库,但未安装该存储库的 GPG 公钥。返回到您获取它的地方,并按照其指示获取和安装公钥。

相关内容