zoukankan      html  css  js  c++  java
  • 关于执行memcached报错问题

    执行
    #/usr/local/memcached/bin/memcached
    随后出现如下错误:
    ./memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory


    找不到libevent-2.0.so.5文件


    解决方法如下:

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

    # ldd /usr/local/memcached/bin/memcached
    linux-vdso.so.1 => (0x00007fffaeae1000)
    libevent-2.0.so.5 => not found
    librt.so.1 => /lib64/librt.so.1 (0x000000374e400000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x000000374e000000)
    libc.so.6 => /lib64/libc.so.6 (0x000000374dc00000)
    /lib64/ld-linux-x86-64.so.2 (0x000000374d400000)

    # LD_DEBUG=libs ./memcached -v
    17015: find library=libevent-2.0.so.5 [0]; searching
    17015: search path=/usr/local/libevent-2.0.22-stable/lib/tls/x86_64:/usr/local/libevent-2.0.22-stable/lib/tls:/usr/local/libevent-2.0.22-stable/lib/x86_64:/usr/local/libevent-2.0.22-stable/lib (RPATH from file ./memcached)
    17015: trying file=/usr/local/libevent-2.0.22-stable/lib/tls/x86_64/libevent-2.0.so.5
    17015: trying file=/usr/local/libevent-2.0.22-stable/lib/tls/libevent-2.0.so.5
    17015: trying file=/usr/local/libevent-2.0.22-stable/lib/x86_64/libevent-2.0.so.5
    17015: trying file=/usr/local/libevent-2.0.22-stable/lib/libevent-2.0.so.5
    17015: search cache=/etc/ld.so.cache
    17015: search path=/lib64/tls/x86_64:/lib64/tls:/lib64/x86_64:/lib64:/usr/lib64/tls/x86_64:/usr/lib64/tls:/usr/lib64/x86_64:/usr/lib64 (system search path)
    17015: trying file=/lib64/tls/x86_64/libevent-2.0.so.5
    17015: trying file=/lib64/tls/libevent-2.0.so.5
    17015: trying file=/lib64/x86_64/libevent-2.0.so.5
    17015: trying file=/lib64/libevent-2.0.so.5
    17015: trying file=/usr/lib64/tls/x86_64/libevent-2.0.so.5
    17015: trying file=/usr/lib64/tls/libevent-2.0.so.5
    17015: trying file=/usr/lib64/x86_64/libevent-2.0.so.5
    17015: trying file=/usr/lib64/libevent-2.0.so.5
    17015:
    ./memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory

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

    # ldd /usr/local/memcached/bin/memcached
    linux-vdso.so.1 => (0x00007fffd5504000)
    libevent-2.0.so.5 => /usr/lib64/libevent-2.0.so.5 (0x00007f2c5c518000)
    librt.so.1 => /lib64/librt.so.1 (0x000000374e400000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x000000374e000000)
    libc.so.6 => /lib64/libc.so.6 (0x000000374dc00000)
    /lib64/ld-linux-x86-64.so.2 (0x000000374d400000)

    问题解决

  • 相关阅读:
    C语言的指针
    C语言的编译过程和GCC编译参数
    GCC编译器的安装
    全字段多条件搜索(api接口)
    C# Replace字符替换函数
    NetCore MemoryCache使用
    vs2017 C# ActiveX浏览器插件 创建 发布 C# windows窗体控件库(.NET Framework)注意事项
    [Asp.net core 3.1] 通过一个小组件熟悉Blazor服务端组件开发
    [AspNetCore 3.0 ] Blazor 服务端组件 Render, RenderFragment ,RenderTreeBuilder, CascadingValue/CascadingParameter 等等
    [AspNetCore 3.0] 在RazorPages/MVC 中使用 Blazor (Razor组件)
  • 原文地址:https://www.cnblogs.com/hjc4025/p/6774268.html
Copyright © 2011-2022 走看看