当前位置:Gxlcms > 数据库问题 > centos7安装mariadb出现依赖问题的解决

centos7安装mariadb出现依赖问题的解决

时间:2021-07-01 10:21:17 帮助过:26人阅读

install mariadb-server Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com * webtatic: us-east.repo.webtatic.com Resolving Dependencies There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those dont work youll have to try removing/installing packages by hand (maybe package-cleanup can help). The program yum-complete-transaction is found in the yum-utils package. --> Running transaction check ---> Package mariadb-server.x86_64 1:5.5.64-1.el7 will be installed --> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.64-1.el7 for package: 1:mariadb-server-5.5.64-1.el7.x86_64 --> Processing Dependency: mariadb(x86-64) = 1:5.5.64-1.el7 for package: 1:mariadb-server-5.5.64-1.el7.x86_64 --> Running transaction check ---> Package mariadb.x86_64 1:5.5.64-1.el7 will be installed ---> Package mariadb-libs.x86_64 1:5.5.64-1.el7 will be installed --> Processing Conflict: MariaDB-compat-10.2.31-1.el7.centos.x86_64 conflicts mariadb-libs < 1:10.1.0 Removing mariadb-libs.x86_64 1:5.5.64-1.el7 - u due to obsoletes from installed MariaDB-compat-10.2.31-1.el7.centos.x86_64 --> Restarting Dependency Resolution with new changes. --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.64-1.el7 will be installed --> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.64-1.el7 for package: 1:mariadb-server-5.5.64-1.el7.x86_64 --> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.64-1.el7 for package: 1:mariadb-5.5.64-1.el7.x86_64 --> Finished Dependency Resolution Error: MariaDB-compat conflicts with 1:mariadb-libs-5.5.64-1.el7.x86_64 Error: Package: 1:mariadb-server-5.5.64-1.el7.x86_64 (base) Requires: mariadb-libs(x86-64) = 1:5.5.64-1.el7 Installed: MariaDB-compat-10.2.31-1.el7.centos.x86_64 (@mariadb) mariadb-libs(x86-64) = 1:10.1.38-1.el7.centos Error: Package: 1:mariadb-5.5.64-1.el7.x86_64 (base) Requires: mariadb-libs(x86-64) = 1:5.5.64-1.el7 Installed: MariaDB-compat-10.2.31-1.el7.centos.x86_64 (@mariadb) mariadb-libs(x86-64) = 1:10.1.38-1.el7.centos You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

报了这么多错误,我也是花费了大量的心思去解决,可是总是不尽人意,还是报错误,突然见我又仔细的查看一下错误的原因,细心一点才发现自己解决错了放心。

大家来看上面的青色背景的话,猛地一看这么多,脑子都懵逼了。不过想要解决,我们得自己慢慢研究才行

仔细一看其实最主要的愿意是青色背景的第一行,也就是这个

  1. Error: MariaDB-compat conflicts with <span style="color: #800080;">1</span>:mariadb-libs-<span style="color: #800080;">5.5</span>.<span style="color: #800080;">64</span>-<span style="color: #800080;">1</span>.el7.x86_64

说白了就是MariaDB-compat这个包和mariadb-libs这个包发生了冲突,既然发生了冲突,我们就要看看安装这个mariadb-server的时候,它需要的是这两个冲突包其中的哪个包,仔细一看

技术图片

 

 不难发现,mariab-server需要安装的是mariadb-libs这个包,但是安装这个包的时候发现“Installed”,也就是后面的MariaDB-compat这个包已经存在系统上面了,那么解决的方法就是把MariaDB-compat给卸载了。

现在我搜索一下

  1. [root@chaofeng ~]# rpm -qa | <span style="color: #0000ff;">grep</span><span style="color: #000000;"> MariaDB
  2. MariaDB</span>-common-<span style="color: #800080;">10.2</span>.<span style="color: #800080;">31</span>-<span style="color: #800080;">1</span><span style="color: #000000;">.el7.centos.x86_64
  3. MariaDB</span>-compat-<span style="color: #800080;">10.2</span>.<span style="color: #800080;">31</span>-<span style="color: #800080;">1</span>.el7.centos.x86_64

发现有两个包,那我干脆两个都直接卸载算了。我使用这种方法居然还不行

  1. [root@chaofeng ~]# rpm -qa | <span style="color: #0000ff;">grep</span> MariaDB | <span style="color: #0000ff;">xargs</span> rpm -<span style="color: #000000;">e
  2. error: Failed dependencies:
  3. libmysqlclient.so.</span><span style="color: #800080;">18</span>()(64bit) is needed by (installed) postfix-<span style="color: #800080;">2</span>:<span style="color: #800080;">2.10</span>.<span style="color: #800080;">1</span>-<span style="color: #800080;">7</span><span style="color: #000000;">.el7.x86_64
  4. libmysqlclient.so.</span><span style="color: #800080;">18</span>()(64bit) is needed by (installed) zabbix-server-mysql-<span style="color: #800080;">4.4</span>.<span style="color: #800080;">6</span>-<span style="color: #800080;">1</span><span style="color: #000000;">.el7.x86_64
  5. libmysqlclient.so.</span><span style="color: #800080;">18</span>()(64bit) is needed by (installed) <span style="color: #0000ff;">perl</span>-DBD-MySQL-<span style="color: #800080;">4.023</span>-<span style="color: #800080;">6</span><span style="color: #000000;">.el7.x86_64
  6. libmysqlclient.so.</span><span style="color: #800080;">18</span>()(64bit) is needed by (installed) zabbix-proxy-mysql-<span style="color: #800080;">4.4</span>.<span style="color: #800080;">7</span>-<span style="color: #800080;">1</span><span style="color: #000000;">.el7.x86_64
  7. libmysqlclient.so.</span><span style="color: #800080;">18</span>(libmysqlclient_18)(64bit) is needed by (installed) postfix-<span style="color: #800080;">2</span>:<span style="color: #800080;">2.10</span>.<span style="color: #800080;">1</span>-<span style="color: #800080;">7</span><span style="color: #000000;">.el7.x86_64
  8. libmysqlclient.so.</span><span style="color: #800080;">18</span>(libmysqlclient_18)(64bit) is needed by (installed) zabbix-server-mysql-<span style="color: #800080;">4.4</span>.<span style="color: #800080;">6</span>-<span style="color: #800080;">1</span><span style="color: #000000;">.el7.x86_64
  9. libmysqlclient.so.</span><span style="color: #800080;">18</span>(libmysqlclient_18)(64bit) is needed by (installed) <span style="color: #0000ff;">perl</span>-DBD-MySQL-<span style="color: #800080;">4.023</span>-<span style="color: #800080;">6</span><span style="color: #000000;">.el7.x86_64
  10. libmysqlclient.so.</span><span style="color: #800080;">18</span>(libmysqlclient_18)(64bit) is needed by (installed) zabbix-proxy-mysql-<span style="color: #800080;">4.4</span>.<span style="color: #800080;">7</span>-<span style="color: #800080;">1</span>.el7.x86_64

原来是卸载的包之间也是有依赖的,所以卸载的时候有一个先后顺序,

  1. [root@chaofeng ~]# rpm -e MariaDB-compat-<span style="color: #800080;">10.2</span>.<span style="color: #800080;">31</span>-<span style="color: #800080;">1</span>.el7.centos.x86_64 --<span style="color: #000000;">force
  2. rpm: only installation and upgrading may be forced</span>

接着卸载另一个

  1. [root@chaofeng ~]# rpm -e MariaDB-common-<span style="color: #800080;">10.2</span>.<span style="color: #800080;">31</span>-<span style="color: #800080;">1</span>.el7.centos.x86_64

两个都卸载完毕了。这样子就清楚了

终于可以安装mariadb-server了

  1. [root@chaofeng ~]# <span style="color: #0000ff;">yum</span> <span style="color: #0000ff;">install</span> mariadb-<span style="color: #000000;">server
  2. Loaded plugins: fastestmirror
  3. Loading mirror speeds from cached hostfile
  4. </span>*<span style="color: #000000;"> base: mirrors.aliyun.com
  5. </span>*<span style="color: #000000;"> extras: mirrors.aliyun.com
  6. </span>*<span style="color: #000000;"> updates: mirrors.aliyun.com
  7. </span>* webtatic: us-<span style="color: #000000;">east.repo.webtatic.com
  8. Resolving Dependencies
  9. There are unfinished transactions remaining. You might consider running </span><span style="color: #0000ff;">yum</span>-complete-transaction, or <span style="color: #800000;">"</span><span style="color: #800000;">yum-complete-transaction --cleanup-only</span><span style="color: #800000;">"</span> and <span style="color: #800000;">"</span><span style="color: #800000;">yum history redo last</span><span style="color: #800000;">"</span>, first to finish them. If those don<span style="color: #800000;">‘</span><span style="color: #800000;">t work you</span><span style="color: #800000;">‘</span>ll have to try removing/installing packages by hand (maybe package-<span style="color: #000000;">cleanup can help).
  10. The program </span><span style="color: #0000ff;">yum</span>-complete-transaction is found <span style="color: #0000ff;">in</span> the <span style="color: #0000ff;">yum</span>-<span style="color: #000000;">utils package.
  11. </span>--><span style="color: #000000;"> Running transaction check
  12. </span>---> Package mariadb-server.x86_64 <span style="color: #800080;">1</span>:<span style="color: #800080;">5.5</span>.<span style="color: #800080;">64</span>-<span style="color: #800080;">1</span><span style="color: #000000;">.el7 will be installed
  13. </span>--> Processing Dependency: mariadb-libs(x86-<span style="color: #800080;">64</span>) = <span style="color: #800080;">1</span>:<span style="color: #800080;">5.5</span>.<span style="color: #800080;">64</span>-<span style="color: #800080;">1</span>.el7 <span style="color: #0000ff;">for</span> package: <span style="color: #800080;">1</span>:mariadb-server-<span style="color: #800080;">5.5</span>.<span style="color: #800080;">64</span>-<span style="color: #800080;">1</span><span style="color: #000000;">.el7.x86_64
  14. </span>--> Processing Dependency: mariadb(x86-<span style="color: #800080;">64</span>) = <span style="color: #800080;">1</span>:<span style="color: #800080;">5.5</span>.<span style="color: #800080;">64</span>-<span style="color: #800080;">1</span>.el7 <span style="color: #0000ff;">for</span> package: <span style="color: #800080;">1</span>:mariadb-server-<span style="color: #800080;">5.5</span>.<span style="color: #800080;">64</span>-<span style="color: #800080;">1</span><span style="color: #000000;">.el7.x86_64
  15. </span>--><span style="color: #000000;"> Running transaction check
  16. </span>---> Package mariadb.x86_64 <span style="color: #800080;">1</span>:<span style="color: #800080;">5.5</span>.<span style="color: #800080;">64</span>-<span style="color: #800080;">1</span><span style="color: #000000;">.el7 will be installed
  17. </span>---> Package mariadb-libs.x86_64 <span style="color: #800080;">1</span>:<span style="color: #800080;">5.5</span>.<span style="color: #800080;">64</span>-<span style="color: #800080;">1</span><span style="color: #000000;">.el7 will be installed
  18. </span>--><span style="color: #000000;"> Finished Dependency Resolution
  19. Dependencies Resolved
  20. </span>===========================================================================================================================================================<span style="color: #000000;">
  21. Package Arch Version Repository Size
  22. </span>===========================================================================================================================================================<span style="color: #000000;">
  23. Installing:
  24. mariadb</span>-server x86_64 <span style="color: #800080;">1</span>:<span style="color: #800080;">5.5</span>.<span style="color: #800080;">64</span>-<span style="color: #800080;">1</span>.el7 base <span style="color: #800080;">11</span><span style="color: #000000;"> M
  25. Installing </span><span style="color: #0000ff;">for</span><span style="color: #000000;"> dependencies:
  26. mariadb x86_64 </span><span style="color: #800080;">1</span>:<span style="color: #800080;">5.5</span>.<span style="color: #800080;">64</span>-<span style="color: #800080;">1</span>.el7 base <span style="color: #800080;">8.7</span><span style="color: #000000;"> M
  27. mariadb</span>-libs x86_64 <span style="color: #800080;">1</span>:<span style="color: #800080;">5.5</span>.<span style="color: #800080;">64</span>-<span style="color: #800080;">1</span>.el7 base <span style="color: #800080;">759</span><span style="color: #000000;"> k
  28. Transaction Summary
  29. </span>===========================================================================================================================================================<span style="color: #000000;">
  30. Install </span><span style="color: #800080;">1</span> Package (+<span style="color: #800080;">2</span><span style="color: #000000;"> Dependent packages)
  31. Total download size: </span><span style="color: #800080;">21</span><span style="color: #000000;"> M
  32. Installed size: </span><span style="color: #800080;">111</span><span style="color: #000000;"> M
  33. Is this ok [y</span>/d/N]:

真是美滋滋。

 

centos7安装mariadb出现依赖问题的解决

标签:dig   info   mariadb   存在   extra   upgrading   ota   history   from   

人气教程排行