解決 libev.so.4()(64bit) is needed by percona-xtrabackup-2.3.4-1.el6.x86_64案例

zping發表於2017-12-22
  1.     在mysql主從同步時經常會用到Xtra, XtraBackup可以說是一個相對完美的免費開源資料備份工具,支援線上無鎖表同步複製和可並行高效率的安全備份恢復機制相比mysqldump來說優勢較大好處多,在RHEL6中安裝XtraBackup時會發生缺少依賴包的現象  
  2.   
  3. 本案例針對Xtra缺少依賴包的情況進行安裝分析解決  
  4.   
  5. 1.本實驗環境  
  6.   
  7. [root@master ~]# uname  -r  
  8. 2.6.32-573.el6.x86_64  
  9.   
  10. [root@master ~]# cat /etc/redhat-release   
  11. Red Hat Enterprise Linux Server release 6.7 (Santiago)  
  12.   
  13. mysql> select version();  
  14.   
  15. +------------+  
  16. | version()  |  
  17. +------------+  
  18. 5.6.28-log |  
  19. +------------+  
  20. 1 row in set (0.00 sec)  
  21.   
  22.   
  23. 2.安裝Xtra  
  24.   
  25. 進入頁面https://www.percona.com/downloads/XtraBackup/LATEST/下載作業系統對應的XtraBackup版本  
  26.   
  27. [root@master ~]# wget  https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.3.4/binary/redhat/6/x86_64/Percona-XtraBackup-2.3.4-re80c779-el6-x86_64-bundle.tar  
  28. --2016-05-17 12:42:14--  https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.3.4/binary/redhat/6/x86_64/Percona-XtraBackup-2.3.4-re80c779-el6-x86_64-bundle.tar  
  29. Resolving www.percona.com... 74.121.199.234  
  30. Connecting to www.percona.com|74.121.199.234|:443... connected.  
  31. HTTP request sent, awaiting response... 200 OK  
  32. Length: 27504640 (26M) [application/x-tar]  
  33. Saving to: “Percona-XtraBackup-2.3.4-re80c779-el6-x86_64-bundle.tar”  
  34.   
  35. 100%[===============================================================================================================>] 27,504,640  2.09M/s   in 16s       
  36.   
  37. 2016-05-17 12:42:32 (1.62 MB/s) - “Percona-XtraBackup-2.3.4-re80c779-el6-x86_64-bundle.tar” saved [27504640/27504640]  
  38.   
  39.   
  40. 下載完成後進行解壓  
  41.   
  42. [root@master ~]# tar  xf Percona-XtraBackup-2.3.4-re80c779-el6-x86_64-bundle.tar   
  43. [root@master ~]# ll  
  44. total 53764  
  45. -rw-------. 1 root root     2103 May 13 01:35 anaconda-ks.cfg  
  46. -rw-r--r--. 1 root root    30419 May 13 01:35 install.log  
  47. -rw-r--r--. 1 root root     7927 May 13 01:32 install.log.syslog  
  48. -rw-rw-r--  1 root root  5701116 Mar 15 01:03 percona-xtrabackup-2.3.4-1.el6.x86_64.rpm  
  49. -rw-r--r--  1 root root 27504640 Mar 17 19:32 Percona-XtraBackup-2.3.4-re80c779-el6-x86_64-bundle.tar  
  50. -rw-rw-r--  1 root root 20820820 Mar 15 01:03 percona-xtrabackup-debuginfo-2.3.4-1.el6.x86_64.rpm  
  51. -rw-rw-r--  1 root root   974656 Mar 15 01:03 percona-xtrabackup-test-2.3.4-1.el6.x86_64.rpm  
  52.   
  53. 3.安裝排錯步驟  
  54.   
  55. 3.1 在安裝過程中發現缺少依賴包lib和perl,原則上能用yum解決的就優先用yum解決,yum解決不掉的可以用網上的yum源或者自己單獨下載rpm包進行安裝  
  56.   
  57. [root@master ~]# rpm -ivh percona-xtrabackup-2.3.4-1.el6.x86_64.rpm  
  58. warning: percona-xtrabackup-2.3.4-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY  
  59. error: Failed dependencies:  
  60.         libev.so.4()(64bit) is needed by percona-xtrabackup-2.3.4-1.el6.x86_64  
  61.         perl(DBD::mysql) is needed by percona-xtrabackup-2.3.4-1.el6.x86_64  
  62.           
  63.   
  64. 3.2 使用本地yum源安裝libev與perl-DBI,但libev.so.4安裝失敗,是由於本地yum源沒有該rpm包,我這裡使用網上下載的rpm包進行安裝  
  65.   
  66. [root@master ~]# yum install  libev.so.4  
  67. Loaded plugins: aliases, changelog, kabi, presto, product-id, security, subscription-manager, tmprepo, verify, versionlock  
  68. This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.  
  69. Loading support for Red Hat kernel ABI  
  70. Setting up Install Process  
  71. file:///yum/Server/repodata/repomd.xml: [Errno 14] Could not open/read file:///yum/Server/repodata/repomd.xml  
  72. Trying other mirror.  
  73. No package libev.so.4 available.  
  74. Error: Nothing to do  
  75.   
  76. 3.3 安裝perl-DBD-MySQL 成功完成  
  77. [root@master ~]# yum install  perl-DBD-MySQL   
  78. Loaded plugins: aliases, changelog, kabi, presto, product-id, security, subscription-manager, tmprepo, verify, versionlock  
  79. This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.  
  80. Loading support for Red Hat kernel ABI  
  81. Setting up Install Process  
  82. Resolving Dependencies  
  83. --> Running transaction check  
  84. ---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed  
  85. --> Processing Dependency: perl(DBI) for package: perl-DBD-MySQL-4.013-3.el6.x86_64  
  86. --> Processing Dependency: perl(DBI::Const::GetInfoType) for package: perl-DBD-MySQL-4.013-3.el6.x86_64  
  87. --> Running transaction check  
  88. ---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed  
  89. --> Finished Dependency Resolution  
  90.   
  91. Dependencies Resolved  
  92.   
  93. =========================================================================================================================================================  
  94.  Package                                 Arch                            Version                              Repository                            Size  
  95. =========================================================================================================================================================  
  96. Installing:  
  97.  perl-DBD-MySQL                          x86_64                          4.013-3.el6                          rhel-source                          134 k  
  98. Installing for dependencies:  
  99.  perl-DBI                                x86_64                          1.609-4.el6                          rhel-source                          707 k  
  100.   
  101. Transaction Summary  
  102. =========================================================================================================================================================  
  103. Install       2 Package(s)  
  104.   
  105. Total download size: 841 k  
  106. Installed size: 2.0 M  
  107. Is this ok [y/N]: y  
  108. Downloading Packages:  
  109. Setting up and reading Presto delta metadata  
  110. Processing delta metadata  
  111. Package(s) data still to download: 841 k  
  112. ---------------------------------------------------------------------------------------------------------------------------------------------------------  
  113. Total                                                                                                                    3.6 MB/s | 841 kB     00:00       
  114. Running rpm_check_debug  
  115. Running Transaction Test  
  116. Transaction Test Succeeded  
  117. Running Transaction  
  118.   Installing : perl-DBI-1.609-4.el6.x86_64                                                                                                           1/2   
  119.   Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                                                     2/2   
  120. rhel-source/productid                                                                                                             | 1.6 kB     00:00 ...   
  121.   Verifying  : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                                                     1/2   
  122.   Verifying  : perl-DBI-1.609-4.el6.x86_64                                                                                                           2/2   
  123.   
  124. Installed:  
  125.   perl-DBD-MySQL.x86_64 0:4.013-3.el6                                                                                                                      
  126.   
  127. Dependency Installed:  
  128.   perl-DBI.x86_64 0:1.609-4.el6                                                                                                                            
  129.   
  130. Complete!  
  131. [root@master ~]# rpm -ivh percona-xtrabackup-2.3.4-1.el6.x86_64.rpm  
  132. warning: percona-xtrabackup-2.3.4-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY  
  133. error: Failed dependencies:  
  134.         libev.so.4()(64bit) is needed by percona-xtrabackup-2.3.4-1.el6.x86_64  
  135.   
  136.   
  137. 3.4 安裝libev包  
  138.   
  139. 到http://rpmfind.net/linux/rpm2html/search.php?query=libev.so.4%28%29%2864bit%29&submit=Search+...&system=&arch= 下載作業系統對應的libev包,注意系統號與版本位數  
  140.   
  141. [root@master ~]# wget  ftp://rpmfind.net/linux/dag/redhat/el6/en/x86_64/dag/RPMS/libev-4.15-1.el6.rf.x86_64.rpm  
  142. --2016-05-17 12:54:43--  ftp://rpmfind.net/linux/dag/redhat/el6/en/x86_64/dag/RPMS/libev-4.15-1.el6.rf.x86_64.rpm  
  143.            => “libev-4.15-1.el6.rf.x86_64.rpm”  
  144. Resolving rpmfind.net... 195.220.108.108  
  145. Connecting to rpmfind.net|195.220.108.108|:21... connected.  
  146. Logging in as anonymous ... Logged in!  
  147. ==> SYST ... done.    ==> PWD ... done.  
  148. ==> TYPE I ... done.  ==> CWD (1) /linux/dag/redhat/el6/en/x86_64/dag/RPMS ... done.  
  149. ==> SIZE libev-4.15-1.el6.rf.x86_64.rpm ... 74692  
  150. ==> PASV ... done.    ==> RETR libev-4.15-1.el6.rf.x86_64.rpm ... done.  
  151. Length: 74692 (73K) (unauthoritative)  
  152.   
  153. 100%[===============================================================================================================>] 74,692       187K/s   in 0.4s      
  154.   
  155. 2016-05-17 12:54:46 (187 KB/s) - “libev-4.15-1.el6.rf.x86_64.rpm” saved [74692]  
  156.   
  157. 安裝RHEL6對應的libev-4.15-1.el6.rf.x86_64.rpm包  
  158. [root@master ~]# rpm -ivh libev-4.15-1.el6.rf.x86_64.rpm  
  159. warning: libev-4.15-1.el6.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY  
  160. Preparing...                ########################################### [100%]  
  161.    1:libev                  ########################################### [100%]  
  162.      
  163.   
  164. 5.完成安裝Xtrabackup  
  165.   
  166. 再次安裝Xtrabackup包,安裝完成  
  167.      
  168. [root@master ~]# rpm -ivh percona-xtrabackup-2.3.4-1.el6.x86_64.rpm  
  169. warning: percona-xtrabackup-2.3.4-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY  
  170. Preparing...                ########################################### [100%]  
  171.    1:percona-xtrabackup     ########################################### [100%]  
  172. [root@master ~]#   
  173.   
  174. 6.總結  
  175.   
  176. 總體來說,安裝Xtra相對簡單,注意下載作業系統型別和位數對應正確的rpm包一般不會出錯  
  177.   
  178. 7. 常用下載地址備註  
  179. 常用下載地址  
  180. libev.so    http://rpmfind.net/linux/rpm2html/search.php?query=libev.so.4%28%29%2864bit%29&submit=Search+...&system=&arch=  
  181. XtraBackup  https://www.percona.com/downloads/XtraBackup/LATEST/  

相關文章