如何在 Redhat Enterprise Linux 上安装 MariaDB?

如何在 Redhat Enterprise Linux 上安装 MariaDB?

我正在尝试MariaDB在我的 AWS 账户中安装 Red Hat Enterprise Linux。当我执行 时,它失败了sudo yum -y install mariadb-server。我如何获取libsystemd它所需的库?

$ sudo yum -y install mariadb-server
Loaded plugins: priorities, update-motd, upgrade-helper
2 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-server.x86_64 0:10.1.13-1.el7.centos will be installed
--> Processing Dependency: libsystemd-daemon.so.0(LIBSYSTEMD_DAEMON_31)(64bit) for package: MariaDB-server-10.1.13-1.el7.centos.x86_64
--> Processing Dependency: MariaDB-common for package: MariaDB-server-10.1.13-1.el7.centos.x86_64
--> Processing Dependency: galera for package: MariaDB-server-10.1.13-1.el7.centos.x86_64
--> Processing Dependency: MariaDB-client for package: MariaDB-server-10.1.13-1.el7.centos.x86_64
--> Processing Dependency: libsystemd-daemon.so.0()(64bit) for package: MariaDB-server-10.1.13-1.el7.centos.x86_64
--> Processing Dependency: libjemalloc.so.1()(64bit) for package: MariaDB-server-10.1.13-1.el7.centos.x86_64
--> Running transaction check
---> Package MariaDB-client.x86_64 0:10.1.13-1.el7.centos will be installed
---> Package MariaDB-common.x86_64 0:10.1.13-1.el7.centos will be installed
---> Package MariaDB-server.x86_64 0:10.1.13-1.el7.centos will be installed
--> Processing Dependency: libsystemd-daemon.so.0(LIBSYSTEMD_DAEMON_31)(64bit) for package: MariaDB-server-10.1.13-1.el7.centos.x86_64
--> Processing Dependency: libsystemd-daemon.so.0()(64bit) for package: MariaDB-server-10.1.13-1.el7.centos.x86_64
---> Package galera.x86_64 0:25.3.15-1.rhel7.el7.centos will be installed
--> Processing Dependency: libboost_program_options.so.1.53.0()(64bit) for package: galera-25.3.15-1.rhel7.el7.centos.x86_64
---> Package jemalloc.x86_64 0:3.3.1-1.8.amzn1 will be installed
--> Running transaction check
---> Package MariaDB-server.x86_64 0:10.1.13-1.el7.centos will be installed
--> Processing Dependency: libsystemd-daemon.so.0(LIBSYSTEMD_DAEMON_31)(64bit) for package: MariaDB-server-10.1.13-1.el7.centos.x86_64
--> Processing Dependency: libsystemd-daemon.so.0()(64bit) for package: MariaDB-server-10.1.13-1.el7.centos.x86_64
---> Package boost-program-options.x86_64 0:1.53.0-14.21.amzn1 will be installed
--> Finished Dependency Resolution
Error: Package: MariaDB-server-10.1.13-1.el7.centos.x86_64 (mariadb)
           Requires: libsystemd-daemon.so.0()(64bit)
Error: Package: MariaDB-server-10.1.13-1.el7.centos.x86_64 (mariadb)
           Requires: libsystemd-daemon.so.0(LIBSYSTEMD_DAEMON_31)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

答案1

您尝试安装的软件包适用于 Red Hat Enterprise Linux / CentOS。

但是,您没有运行此操作系统。您的实例正在运行 Amazon Linux。Amazon Linux 与适用于 RHEL/CentOS 的软件包不兼容。

要解决该问题,请创建一个运行最新版本的 RHEL 或 CentOS 的新实例。

答案2

我确认解决方案已使用 CentOS 5 为 Amazonlinux 上的存储库完成安装。阅读注释备份这里

MariaDB 存储库配置位于 /etc/yum.conf.d/MariaDB.repo

[mariadb]
  name = MariaDB
  baseurl = http://yum.mariadb.org/10.1/centos6-amd64
  gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
  gpgcheck=1

相关内容