libaio.so.1: cannot open shared object file

前端 未结 7 884
名媛妹妹
名媛妹妹 2021-02-02 05:40

I have a simple test program that when I run I get:

./hello: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or d         


        
相关标签:
7条回答
  • 2021-02-02 06:35

    In case one does not have sudo privilege, but still needs to install the library.

    Download source for the software/library using:

    apt-get source libaio
    

    or

    wget https://src.fedoraproject.org/lookaside/pkgs/libaio/libaio-0.3.110.tar.gz/2a35602e43778383e2f4907a4ca39ab8/libaio-0.3.110.tar.gz
    

    unzip the library

    Install with the following command to user-specific library:

    make prefix=`pwd`/usr install #(Copy from INSTALL file of libaio-0.3.110)
    

    or

    make prefix=/path/to/your/lib/libaio install
    

    Include libaio library into LD_LIBRARY_PATH for your app:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/your/lib/libaio/lib
    

    Now, your app should be able to find libaio.so.1

    0 讨论(0)
提交回复
热议问题