報錯install_driver(mysql) failed: Attempt to reload DBD/mysql.pm
文章目錄
-
操作環境
-
問題
-
分析問題
-
培訓課件
-
聯絡方式
操作環境
-
作業系統版本
[root@three57 mysql57_dir]# more /etc/redhat-release Red Hat Enterprise Linux Server release 6.8 (Santiago)
-
pt-query-digest版本
[root@three57 mysql57_dir]# pt-query-digest --version pt-query-digest 3.1.0
問題
-
執行pt-query-digest報錯
[root@three57 percona-toolkit-3.1.0]# pt-query-digest --interval=2 --processlist -uroot -psystem Reading from STDIN ... install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted. Compilation failed in require at (eval 23) line 3.
分析問題
-
經查baidu與perl的mysql.so庫檔案相關
[root@three57 percona-toolkit-3.1.0]# locate mysql.so /usr/lib64/perl5/auto/DBD/mysql/mysql.so
-
分析perl的mysql.so庫檔案的依賴庫是否完整,可見缺失libmysqlclient.so.16
[root@three57 percona-toolkit-3.1.0]# ldd /usr/lib64/perl5/auto/DBD/mysql/mysql.so linux-vdso.so.1 => (0x00007ffcf6dd4000) libmysqlclient.so.16 => not found 確實沒找到mysql動態連結庫 libz.so.1 => /lib64/libz.so.1 (0x00007f9b0e1cb000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f9b0df94000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f9b0dd7b000) libm.so.6 => /lib64/libm.so.6 (0x00007f9b0daf6000) libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f9b0d88a000) libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f9b0d4a6000) libc.so.6 => /lib64/libc.so.6 (0x00007f9b0d111000) libfreebl3.so => /lib64/libfreebl3.so (0x00007f9b0cf0e000) libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f9b0ccca000) libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f9b0c9e2000) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f9b0c7de000) libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f9b0c5b2000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f9b0c397000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f9b0c193000) /lib64/ld-linux-x86-64.so.2 (0x000000381da00000) libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f9b0bf88000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f9b0bd84000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9b0bb67000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f9b0b947000)
-
libmysqlclient.so這種庫檔案源於mysql安裝介質
-
查詢已安裝的mysql軟體包
[root@three57 mysql57_dir]# rpm -qa|grep -i --color mysql mysql-community-common-5.7.21-1.el6.x86_64 mysql-community-server-5.7.21-1.el6.x86_64 perl-DBD-MySQL-4.013-3.el6.x86_64 mysql-community-libs-5.7.21-1.el6.x86_64 mysql-community-client-5.7.21-1.el6.x86_64
-
查詢已安裝的libmysqlclient庫檔案
[root@three57 mysql57_dir]# locate /usr/lib64/mysql/libmysqlclient.so.20 /usr/lib64/mysql/libmysqlclient.so.20 /usr/lib64/mysql/libmysqlclient.so.20.3.8
-
綜上所述,應該需要安裝mysql軟體包mysql-community-libs-compat
(注:它是提供mysql舊版本的共享庫檔案)
[root@three57 mysql57_dir]# rpm -ivh mysql-community-libs-compat-5.7.21-1.el6.x86_64.rpm warning: mysql-community-libs-compat-5.7.21-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ########################################### [100%] 1:mysql-community-libs-co########################################### [100%] [root@three57 mysql57_dir]# locate libmysqlclient.so.16 /usr/lib64/mysql/libmysqlclient.so.16 /usr/lib64/mysql/libmysqlclient.so.16.0.0
-
執行ldd /usr/lib64/perl5/auto/DBD/mysql/mysql.so正常
[root@three57 mysql57_dir]# ldd /usr/lib64/perl5/auto/DBD/mysql/mysql.so linux-vdso.so.1 => (0x00007ffd3fee9000) libmysqlclient.so.16 => /usr/lib64/mysql/libmysqlclient.so.16 (0x00007f346d4e3000) libz.so.1 => /lib64/libz.so.1 (0x00007f346d2cd000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f346d095000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f346ce7c000) libm.so.6 => /lib64/libm.so.6 (0x00007f346cbf8000) libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f346c98b000) libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f346c5a7000) libc.so.6 => /lib64/libc.so.6 (0x00007f346c213000) libfreebl3.so => /lib64/libfreebl3.so (0x00007f346c00f000) libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f346bdcb000) libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f346bae4000) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f346b8df000) libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f346b6b3000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f346b499000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f346b294000) /lib64/ld-linux-x86-64.so.2 (0x000000381da00000) libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f346b089000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f346ae86000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f346ac68000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f346aa49000)
培訓課件
(收費20元)
聯絡方式
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-2664532/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- querydsl報錯: Attempt to recreate a file for type
- 升級到 MySQL 8.4,MySQL 啟動報錯:io_setup() failed with EAGAINMySqlAI
- 安裝MySQL5.7報錯:The action ‘Install’ for product ‘MySQL Server 5.7.19’ failed.MySqlServerAI
- zabbix報錯fping failed:no outputAI
- OGG Director報錯 Connection FAILEDAI
- laravel 8.0 Auth 登入 Auth::attempt () 為什麼報錯?Laravel
- pb安裝多個版本時候,執行pbw時會報 Attempt to open datawindow failedAI
- IDEA 報錯Failed to load JVM DLLIdeaAIJVM
- SQLServer映象報錯Connection handshake failedSQLServerAI
- PHP composer 報錯 certificate verify failedPHPAI
- python3中reload()函式報錯怎麼解決Python函式
- weblogic報錯: OPatch failed with error code 73WebAIError
- Linux 報錯Certificate verification failed: The certificate is NOT trusted.LinuxAIRust
- laradock 執行報錯 Service 'workspace' failed to build:AIUI
- Mysql啟動報錯:Job for mysqld.service failed because the control process exited with error code.MySqlAIError
- MySQL建立使用者報錯 ERROR 1396 (HY000): Operation CREATE USER failed for 'afei'@'%'MySqlErrorAI
- mysql 8 報錯 ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repositoryMySqlErrorAIStruct
- ElasticSearch啟動報錯 ERROR: [4] bootstrap checks failedElasticsearchErrorbootAI
- 報錯:TestEngine with ID ‘junit-jupiter‘ failed to discover testsAI
- cadvisor報錯failed to collect filesystem stats- rootDiskErr: du command failed on /rootfs/var/lib/docAI
- PyTorch出現:RuntimeError: An attempt has been made to start a new process...報錯 (已解決)PyTorchError
- jpa報錯 Failed to initialize JPA EntityManagerFactory: Unable to instantiate default tuplizerAI
- 啟動IDEA 報 failed to load jvm dll XXX 錯誤IdeaAIJVM
- SQLServer搭建域控下映象報錯Connection handshake failedSQLServerAI
- Vue 啟動專案報錯 Failed to compile with 2 errorsVueAICompileError
- MySQL錯誤修復:Table xx is marked as crashed and last (automatic?) repair failedMySqlASTAI
- 上傳報錯:Upload Failed: Your upload has failed a virus scan. Please choose another file.AI
- Mysql8.0 報錯MySql
- imagick使用readImage報錯 Failed to read the file 或者沒有報錯內容的解決方法AI
- nginx 報錯 accept4 () failed (24: Too many open files)NginxAI
- mysql執行報錯mysql.sockMySql
- Installation failed with message INSTALL_FAILED_USER_RESTRICTED錯誤AIREST
- iOS開發除錯之報錯:Command /usr/bin/codesign failed with exit code 1iOS除錯AI
- Nginx reloadNginx
- mysql checksum 報錯問題。MySql
- MySql報錯(持續更新)MySql
- mysql 報錯 Communications link failureMySqlAI
- [重慶思莊每日技術分享]-psu報錯“CheckActiveFilesAndExecutables” failedAI