CentOS中libevent-2.0.so.5 not found 解決 ldd 方法

來源:互聯網
上載者:User

CentOS中libevent-2.0.so.5 not found 解決 ldd 方法

安裝memcache時,需要建立檔案索引或者說檔案串連(link),類似windows下的捷徑

啟動服務時出現 error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory

>whereis libevent-2.0.so.5

libevent-2.0.so.5: /usr/local/lib/libevent-2.0.so.5

> ldd /usr/local/bin/memcached (ldd指令不熟悉的去查看下)
libevent-2.0.so.5 => not found (沒有找到該檔案)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b83fce0e000)
libc.so.6 => /lib64/libc.so.6 (0x00002b83fd029000)
librt.so.1 => /lib64/librt.so.1 (0x00002b83fd381000)
/lib64/ld-linux-x86-64.so.2 (0x00002b83fc9b0000)

> LD_DEBUG=libs ./memcached -v
找到預設路徑 /usr/lib/

>sudo ln -s /usr/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5

>sudo ldd /usr/local/bin/memcached
libevent-2.0.so.5 => /usr/lib64/libevent-2.0.so.5 (0x00002b83fcbcd000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b83fce0e000)
libc.so.6 => /lib64/libc.so.6 (0x00002b83fd029000)
librt.so.1 => /lib64/librt.so.1 (0x00002b83fd381000)
/lib64/ld-linux-x86-64.so.2 (0x00002b83fc9b0000)

現在好啦,:)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.