
我想安裝 mariadb 但出現此錯誤
[root@wslb_206]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@wslb_206]# yum install mariadb-server mariadb
--> Finished Dependency Resolution
Error: Package: 1:mariadb-server-5.5.56-2.el7.x86_64 (local)
Requires: mariadb-libs(x86-64) = 1:5.5.56-2.el7
Installed: 1:mariadb-libs-5.5.52-1.el7.x86_64 (@anaconda)
mariadb-libs(x86-64) = 1:5.5.52-1.el7
Error: Package: 1:mariadb-5.5.56-2.el7.x86_64 (local)
Requires: mariadb-libs(x86-64) = 1:5.5.56-2.el7
Installed: 1:mariadb-libs-5.5.52-1.el7.x86_64 (@anaconda)
mariadb-libs(x86-64) = 1:5.5.52-1.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
我怎樣才能更新mariadb-libs-5.5.52-1.el7.x86_64
到mariadb-libs(x86-64) = 1:5.5.56-2.el7
?
謝謝。
答案1
mariadb
是 CentOS 7 中基礎儲存庫的一部分,應該已經安裝。不相容可能是由於您配置的其他儲存庫(例如 IUS、EPEL)造成的。
/etc/yum.repos.d/
透過將所有不存在的檔案移至其他位置來停用第三方儲存庫CentOS-*.repo
,然後嘗試:
yum clean all
yum remove mariadb-libs
yum install mariadb-server
答案2
如果您已經從 MySQL 社群伺服器安裝了 MySQL 8,現在想要mariadb
改為安裝,請執行以下操作:
執行
yum history
清單以查看所有yum
歷史記錄:sudo yum --setopt=history_list_view=commands history list all
從安裝 MySQL 社群伺服器的行取得 id
執行以下命令來撤銷
mariadb
庫sudo yum history undo ID
現在您應該可以
mariadb
使用以下命令進行安裝:sudo yum install mariadb mariadb-server