Centos

在 Centos 7 上安裝 MariaDB 10.4

  • December 16, 2019

我在 Centos 7 上安裝 MariaDB 10.4 時遇到了一些麻煩。官方的mariaDB 指南MariaDB.repo應該創建一個新的 repo 文件,/etc/yum.repos.d/其中包含以下內容:

# MariaDB 10.4 CentOS repository list - created 2019-12-13 22:03 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-ppc64le
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

我已經執行yum-config-manager --enable MariaDB.repoyum update檢查了啟用的儲存庫:

$ enabled | grep maria
mariadb          MariaDB              86

這確認新的 repo 已啟用。嚮導後來說跑步sudo yum install MariaDB-server MariaDB-client。不幸的是,沒有什麼要安裝的,因為我收到了一條消息:

Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.anexia.at
* epel: ftp.uni-kl.de
* extras: mirror.easyname.at
* remi-php74: remi.mirror.karneval.cz
* remi-safe: remi.mirror.karneval.cz
* updates: centos.anexia.at
No package MariaDB-server available.
 * Maybe you meant: mariadb-server
No package MariaDB-client available.

請注意,沒有提到MariaDB.repo我剛剛啟用。此外,建議的軟體包mariadb-server是 5.5 版。在 Centos 7 上安裝 MariaDB 10.4 版的正確方法是什麼?

我認為您在 MariaDB 儲存庫配置工具中選擇了錯誤的 cpu 架構。

我已經在帶有 Intel cpu 和 MariaDB.repo 的 CentOS 7 中進行了測試,您發布的行為如您所說,但是如果我為 Intel (x86_64) 配置 repo,則在執行時正確安裝

yum install MariaDB-server

輸出是

# yum install MariaDB-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.uvigo.es
* extras: centos.uvigo.es
* updates: centos.uvigo.es
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-server.x86_64 0:10.4.11-1.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================
Package                                     Arch                                Version                                            Repository                            Size
===============================================================================================================================================================================
Installing:
MariaDB-server                              x86_64                              10.4.11-1.el7.centos                               mariadb                               26 M

如果 cpu 選擇正確,我不知道會發生什麼,並且我沒有具有 ppc64le 架構的系統來測試。

引用自:https://unix.stackexchange.com/questions/557134