0
Follow
0
View

Cannot find the.so file when running the program

dingdh13 注册会员
2023-02-28 11:16

Reference GPT
This error is usually caused by the system being unable to find the desired shared library file(.so file). This may be because the file is not installed correctly or is not added to the system's shared library path.

You can try the following ways to solve this problem:

Verify that the shared library is installed correctly. You need to check that the library has been properly installed on the system, if not, reinstall the library.

Adds the shared library path to the system's shared library path. You can add this path to the system's shared library path using the following command:
javascript

export LD_LIBRARY_PATH=/path/to/so/file:$LD_LIBRARY_PATH

Where /path/to/so/file is the path to the shared library file. This command adds the path to the system's shared library path and the old shared library path after the new path.

If you have put the shared library file in the system's shared library path and the error still occurs, you can try to update the system's shared library cache using the following command:

sudo ldconfig

This command updates the system's shared library cache and reloads all shared library files.

If the above methods do not solve the problem, you can try to find if the shared library file has been installed correctly, and make sure that its path is correctly added to the system's shared library path.

cs88655555 注册会员
2023-02-28 11:16

the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > this error message indicates that your program needs to rely on a Shared library file called" libarmnn. So ", but the system cannot find the file. This is usually because the shared library is not installed or configured properly on the system.

Here are some possible solutions:

1. Check that the shared library is installed correctly: First, you need to determine whether the "libarmnn.so" shared library file is installed on your system. You can use your system's package manager to find and install the library file; the exact commands may vary by operating system and distribution. For example, for Ubuntu, you can try running the following command to install the library:

sudo apt-get install libarmnn-dev


2. Check that the shared library path is correct: If you have installed the library file correctly and still experience the error, the system may not be able to find the library file. You can try adding the path where the library file resides to the system's shared library search path. Specifically, you can add the directory where the library files are located to the LD_LIBRARY_PATH environment variable as follows:

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


Where /path/to/lib is the directory where "libarmnn.so" resides. If you don't want to manually set the environment variable every time, you can add it to your bashrc or other shell configuration file.

3. Check that the compilation options are correct: If you compiled the library file yourself and you encounter this error, it may be caused by incorrect compilation options. You need to make sure that the library files are properly linked to the executable at compile time. Specifically, you need to add the "-larmnn" option to the compile option, as follows:

g++ -o my_program my_program.cpp -larmnn


where my_program.cpp is your source code file, and "-larmnn" means linking to the "libarmnn.so" library file.

Hopefully these solutions will help you solve the problem.

cyflove23 注册会员
2023-02-28 11:16

error while loading shared libraries: libarmnn.so: cannot open shared object file: No such file ordirectory
This problem occurs when running the./mnist_caffe file, the dependent libarmnn.so cannot be found.
libarmnn.so is actually a compiled file in the directory /home/lgg/armnnsdk.armnn.
There are generally two ways to solve this problem:
1. Run sudo gedit /etc/ld.so.conf, add /home/lgg/armnnsdk/armnn where libarmnn.so resides, and run sudo /sbin/ldconfig to make the libarmnn.so directory take effect. However, this is generally not done for self-compiled generated files. Self-compiled generated libraries generally use the Method 2 configuration path.
Run sudo gedit ~/.bash_profile and add export LD_LIBRARY_PATH=/home/lg/armnnSDK/armnn:$LD_LIBRARY_PATH.
or export LD_LIBRARY_PATH=/home/lg/armnnSDK/armnn:$LD_LIBRARY_PATH if it takes effect only on the current terminal.
I hope this helps you.

daioa1 注册会员
2023-02-28 11:16
< div class = "md_content_show e397 data - v - 3967" = "" >

thanks, according to the instructions have been solved.