1. 程式人生 > >啟動zabbix報缺少libmysqlclient.so.18

啟動zabbix報缺少libmysqlclient.so.18

今天在本地伺服器安裝zabbix啟動時,啟動不起來
於是檢視錯誤,報以下錯誤
7月 17 17:34:11 localhost.localdomain zabbix_server[14009]: /usr/sbin/zabbix_server: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

程式碼:

[[email protected] zabbix]# systemctl start zabbix-server
Job for zabbix-server.service failed because the control process exited with error code. See "systemctl status zabbix-server.service" and "journalctl -xe" for details.
[
[email protected]
zabbix]# systemctl status zabbix-server ● zabbix-server.service - Zabbix Server Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; disabled; vendor preset: disabled) Active: activating (auto-restart) (Result: exit-code) since 一 2017-07-17 17:07:43 CST; 4s ago Process: 13645 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=127) 7月 17 17:07:43 localhost.localdomain systemd[1]: Failed to start Zabbix Server. 7月 17 17:07:43 localhost.localdomain systemd[1]: Unit zabbix-server.service entered failed state. 7月 17 17:07:43 localhost.localdomain systemd[1]: zabbix-server.service failed. [
[email protected]
zabbix]# journalctl -xe -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit zabbix-server.service has failed. -- -- The result is failed. 7月 17 17:34:00 localhost.localdomain systemd[1]: Unit zabbix-server.service entered failed state. 7月 17 17:34:00 localhost.localdomain systemd[1]: zabbix-server.service failed. 7月 17 17:34:11 localhost.localdomain systemd[1]: zabbix-server.service holdoff time over, scheduling restart. 7月 17 17:34:11 localhost.localdomain systemd[1]: Starting Zabbix Server... -- Subject
: Unit zabbix-server.service has begun start-up
-- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit zabbix-server.service has begun starting up. 7月 17 17:34:11 localhost.localdomain zabbix_server[14009]: /usr/sbin/zabbix_server: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory 7月 17 17:34:11 localhost.localdomain systemd[1]: zabbix-server.service: control process exited, code=exited status=127 7月 17 17:34:11 localhost.localdomain systemd[1]: Failed to start Zabbix Server. -- Subject: Unit zabbix-server.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit zabbix-server.service has failed. -- -- The result is failed. 7月 17 17:34:11 localhost.localdomain systemd[1]: Unit zabbix-server.service entered failed state. 7月 17 17:34:11 localhost.localdomain systemd[1]: zabbix-server.service failed. lines 2608-2633/2633 (END)

檢視錯誤應該是缺少和找不到libmysqlclient.so.18
於是在網上找解決方法,網上大部分說的如下:

網上解決方法

[root@localhost ~]# locate libmysqlclient.so.18
/usr/local/mysql/lib/libmysqlclient.so.18
/usr/local/mysql/lib/libmysqlclient.so.18.0.0
/usr/src/mysql-5.6.10/libmysql/libmysqlclient.so.18
/usr/src/mysql-5.6.10/libmysql/libmysqlclient.so.18.0.0

[root@localhost ~]# echo "/usr/local/mysql/lib" >> /etc/ld.so.conf

[root@localhost ~]# ldconfig

但是我的機器裡沒有libmysqlclient.so之類的檔案。
在網上發現了這篇文章文章地址
文章上有個下載libmysqlclient.so.*的地址,下載地址,下載(拷貝)過來就可以了。然後再執行以上步驟zabbix就可以正常啟動了。
(注意自己的下載的檔案地址)

[[email protected] ling]# wget -O /usr/lib/libmysqlclient.so.18 http://files.directadmin.com/services/es_7.0_64/libmysqlclient.so.18
--2017-07-17 17:34:07--  http://files.directadmin.com/services/es_7.0_64/libmysqlclient.so.18
正在解析主機 files.directadmin.com (files.directadmin.com)... 208.167.226.3, 69.162.69.58, 216.144.254.90
正在連線 files.directadmin.com (files.directadmin.com)|208.167.226.3|:80... 已連線。
已發出 HTTP 請求,正在等待迴應... 200 OK
長度:6911555 (6.6M) [application/octet-stream]
正在儲存至: “/usr/lib/libmysqlclient.so.18100%[========================================================================================================================================================================================================================>] 6,911,555    117KB/s 用時 63s    

2017-07-17 17:35:11 (108 KB/s) - 已儲存 “/usr/lib/libmysqlclient.so.18” [6911555/6911555])
[[email protected] ling]# ll /usr/lib/libmysqlclient.*
-rw-r--r--. 1 root root 6911555 78 2014 /usr/lib/libmysqlclient.so.18
[[email protected] ling]# locate libmysqlclient.so.18
##執行locate沒找到,(作者是個運維小學生)所以不知道什麼原因,
[[email protected] ling]# echo "/usr/lib" >> /etc/ld.so.conf
[[email protected] ling]# ldconfig
[[email protected] ling]# 
[[email protected] zabbix]# systemctl start zabbix-server
[[email protected] zabbix]# 
[[email protected] zabbix]# systemctl status zabbix-server
● zabbix-server.service - Zabbix Server
   Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; disabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since 一 2017-07-17 18:01:50 CST; 5s ago
  Process: 14840 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=1/FAILURE)
  Process: 14835 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
 Main PID: 14837 (code=exited, status=1/FAILURE)

717 18:01:50 localhost.localdomain kill[14840]: -q, --queue <訊號>      使用 sigqueue(2) 代替 kill(2)
717 18:01:50 localhost.localdomain kill[14840]: -p, --pid              列印 pid 而不向它們傳送訊號
717 18:01:50 localhost.localdomain kill[14840]: -l, --list [=<訊號>]   列出訊號名,或將一個訊號轉換為名稱
717 18:01:50 localhost.localdomain kill[14840]: -L, --table            列出訊號名和數值
717 18:01:50 localhost.localdomain kill[14840]: -h, --help     顯示此幫助並退出
717 18:01:50 localhost.localdomain kill[14840]: -V, --version  輸出版本資訊並退出
717 18:01:50 localhost.localdomain kill[14840]: 更多資訊請參閱 kill(1)。
717 18:01:50 localhost.localdomain systemd[1]: zabbix-server.service: control process exited, code=exited status=1
717 18:01:50 localhost.localdomain systemd[1]: Unit zabbix-server.service entered failed state.
717 18:01:50 localhost.localdomain systemd[1]: zabbix-server.service failed.

### 已經不報libmysqlclient.so.18找不到,但是還有別的問題,繼續埋坑~

我不知道這樣解決方法是否正確,但是zabbix是正常啟動了,如果哪位有好的解決方法,請留言,或者連結解決文章地址。

相關推薦

啟動zabbix缺少libmysqlclient.so.18

今天在本地伺服器安裝zabbix啟動時,啟動不起來 於是檢視錯誤,報以下錯誤 7月 17 17:34:11 localhost.localdomain zabbix_server[14009]: /usr/sbin/zabbix_server:

重啟Zabbix服務提示缺少libmysqlclient.so.18解決方法

zabbix在重啟Zabbix3.2.7服務時,出現了以下錯誤原因是缺少了mysql的庫文件,提示沒有那個文件或目錄。之前裝的是mysql5.5版本的數據庫,庫路徑為/usr/local/mysql55/lib/libmysqlclient.so.18,現在只需把庫路徑添加到/etc/ld.so.conf配置

Nagios監控mysql從庫libmysqlclient so 18 cannot open shared

                做mysql的slave監控的時候,需要check_mysql指令碼,check的時候報錯: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file:

yum安裝軟體時報錯libmysqlclient.so.18()(64bit)---Linux

yum安裝軟體時報錯libmysqlclient.so.18()(64bit) 環境:CentOS 7.2,使用網易yum的網路源 問題: 使用yum安裝軟體時報錯 ... 2:postfix-2.

postfix找不到libmysqlclient.so.18

使用 emc gen exec ase ces open AI active   最近需要下服務器上安裝gitlab,在使用yum安裝postfix之後,啟動post報錯,進行debug顯示如下錯誤提示 [root@localhost ~]# systemctl st

Error loading MySQLdb module: libmysqlclient.so.18: cannot open shared object file: No such file or directory

在hue上配置Mysql的時候,出現的錯誤:  發生伺服器錯誤:  Error loading MySQLdb module: libmysqlclient.so.18: cannot open shared&n

yum安裝軟體時報錯libmysqlclient.so.18()(64bit)

環境:CentOS 7.4,使用阿里yum的網路源 問題: 使用yum安裝軟體時報錯 ... 2:postfix-2.10.1-6.el7.x86_64 has missing requires of libmysqlclient.so.18()(64bit) 2:postf

MySQL-python Error loading MySQLdb module: libmysqlclient.so.18

Django 專案重新部署到同事給我的的一臺centos伺服器上之後,因為引入了MySQL-python==1.2.5,執行出現錯誤:MySQL-python Error loading MySQLdb module: libmysqlclient.so.18 可知這是缺少so檔案引

python連線mysql資料庫時報錯:import _mysql ImportError: libmysqlclient.so.18: cannot open shared object file:

今天練習python程式設計時,連線資料庫,報錯如下,說是某一個模組沒找到,百度了一上午,發現還是自己太嫩,經驗不足。 報錯如下: raceback (most recent call last): File “mysqlshell.py”, line

MySQLdb ImportError: libmysqlclient.so.18解決方法

MySQLdb匯入後,執行程式碼程式出現了兩個問題: 問題一: ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory 問題分析: 說明/usr/lib/

啟動apache時報錯libmysqlclient.so.16 not found的處理

在安裝LAMP環境時,apache:2.2.9,php:5.3.3 , mysql:5.6.33。 所有均為原始碼安裝,但是安裝完後,啟動apache出現報錯 libmysqlclient.so.16  not found............ 檢視lib資料夾,發現只有

ogg啟動錯libnnz11.so: cannot open shared object file

version pat director ggsci 11.2.1 aries targe 64bit ews 當ogg軟件解壓,並給予正確的權限後,在啟動ogg時會遇到如下報錯: [[email protected]/* */ ogg]# ./ggsci./g

centos 編譯錯,缺少libssh2.so

報錯Log: /usr/bin/ld: cannot find -lssh2 collect2: ld returned 1 exit status   解決方式: 1.下載原始碼,wget http://www.libssh2.org/download

yum源安裝php缺少libmcrypt.so.4()(64bit)庫

今天yum安裝php-fpm(自己公司做的rpm包和源)報錯 報錯資訊如下: 1 2 3 4 5 --> Finished Dependency Resolution php-fpm-5.3.10-mjh.1.x86_64 from 

解決tpcc_load 錯 error while loading shared libraries: libmysqlclient.so.20

sha 出現 aries tpcc con find col 但是 報錯 在剛開始導入tpcc數據倉庫時,可能會遇到 error while loading shared libraries: libmysqlclient.so.20這個錯誤,找不到庫文件。 但是,通過f

web登錄zabbixDB type is not set

db type is not set今天通過web訪問zabbix的時候,報如下錯誤查看關於zabbix的web界面設置的php文件,不知道為啥變成了空文件,報錯原因get!好在這個文件是有模板的,不用自己從零開始配置,下面看看這個模板文件的內容[[email protected]/* */ ~]

IDEA啟動Tomcat

span log font .com cte ultimate cli led tomcat Maven編譯成功, 可是啟動Tomcat報錯: Application Server was not connected before run configuration

ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory 解決辦法

object init ror 文件 module libmysql 找到 str 軟連接 >>> import MySQLdbTraceback (most recent call last): File "<stdin>", line

啟動Tomcat錯:JVM_Bind

啟動tomcat lips ava -a 目的 再次 由於 netstat 運行 今天運行項目遇到了一個很奇怪的問題, 由於之前的Eclipse沒有正常關閉(也就是直接殺死進程,而沒有關閉Tomcat)。 等再次運行tomcat項目的時候一直報錯說是JVM_Bind, 自己

啟動hive錯[ERROR] Terminal initialization failed; falling back to unsupported

ror -m initial erro nal hadoop lin con 錯誤 啟動hive時報例如以下的錯誤[ERROR] Terminal initialization failed; falling back to unsupported 解決的方法:進入到h