im trying to run LS-OPT UI 5.2.1 on my OpenSUSE system.
it tells me the following:
./lsoptui: error while loading shared libraries: libpng14.so.14: cannot open shared object file: No such file or directory
But libpng14.so.14 is installed in /usr/lib
Whats the Problem here?
Do i have to link it somehow?
Thank you very much
Your program is trying to search for the library somewhere different. I recommend trying to run your binary with strace. You should be able to see where the binary is looking at. At the place you should create symbolic link to the installed library.
Related
I have SDL, SDL image with png libraries working fine. I have a small game I'm making and it runs well on my windows 10 machine and my raspberry pi. Yesterday I started adding sound effects and music on my windows box. Everything working just fine. I port the code over to my pi and I'm getting this error when trying to run now:
error while loading shared libraries: libSDL2_mixer-2.0.so.0: cannot open shared object file: No such file or directory .
To me this makes no sense because I am linking with -lSDL2_mixer and I have all the required files in /usr/local/lib, where all of my other SDL libraries are (and all the others are being found just fine by my system).
The files that got installed in /usr/local/lib after my make install command were:
libSDL2_mixer.a
libSDL2_mixer.la
libSDL2_mixer.so
libSDL2_mixer-2.0.so.0
libSDL2_mixer-2.0.so.0.2.2
Again this all looks good to me. I also tried copying those files to a separate folder and made sure I was including that folder in my execution command, still got the same error. Anyone have any tips they can share?
Figured it out maybe 10 minutes after posting this.
I was searching apt-cache for other mixer packages out there and found "libsdl2mixer-2.0-0", which I thought I already had? but guess not. I installed that and everything works now.
Hope this helps someone.
I am writing a little project in which I want to call a function from a shared library. For that I want to use libdl.so's dlopen() function.
I have everything set up so that it will work just fine when I build and run it as a 64bit application. However as soon as I am compiling it as a 32bit application and then try to run it, it won't be able to load any library.
dlopen() simply returns null and a call to dlerror() reveals
libtbbmalloc.so.2: cannot open shared object file: No such file or directory
Now I am guessing that I have to somehow install a 32bit version of that library but I can't find it in the package manager and what I have found online isn't too helpful either.
Does someone know that the problem is and/or how I could fic it?
I am building my project via cmake v3.10 and in the CMakeLists.txt I am using this instructions for 32bit:
set_target_properties(clib PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
target_link_libraries(clib /usr/lib32/libdl.so)
I have installed the package g++-multilib and my g++ version is 7.3.0.
I am attempting to build my program on Linux Mint 18.3 (6bit).
With the help of #Lorinczy Zsigmond in the comments, I was able to find the problem: I had to install the packages libtbb-dev:i836 and libz-dev:i836 in order for the function loading to work properly.
I'm trying to get SFML (www.sfml-dev.org) running under Eclipse which is running on Ubuntu 16.04, my c++ compiler is nvcc as this is a cuda project. I have my includes and libraries set up as follows:
The project builds fine, but when I run it I get the error message:
error while loading shared libraries: libsfml-window.so.2.4: cannot open shared object file: No such file or directory
This is weird, because the file exists (/home/timo/cuda-workspace/CudaTutorial/SFML/lib). Does anyone know how I can resolve this issue?
Well, in the end creating a conf file did it:
gksudo gedit /etc/ld.so.conf.d/sfml.conf
/lib/SFML/lib
sudo ldconfig
(I put the SFML build into lib in case I want to use it in another project).
SYSTEM: Ubuntu 16 LTS
Compiler: g++
I)
I have built OpenCV from source. I followed these steps:
1.) Downloaded OpenCV source / code (3.1.0)
2.) Unzipped it
3.) Used cmake with default settings (cmake ..) because any other options were throwing up make errors later on
4.) make -j4
5.) successful install
Now when I compile from the command line using
g++ -o testwav wavfil.cpp `pkg-config opencv --cflags --libsopencv`;./testwav
I get the following error
./testwav: error while loading shared libraries: libgfortran.so.1: cannot open shared object file: No such file or directory
This happens for all c++ files using OpenCV only. Normal c++ files (using only standard c++ in-built libraries) work fine though.
On doing some research I cant find anything specific to this error, but I can find a solution to a general case for it, i.e., when an .so file is not found (means your libraries are missing or you dont have access permissions or need to use sudo to run the command).
I think it is because of OpenCV pointing to the wrong libraries. I had come across something about modifying .pc files but I cant seem to find it right now. I may be wrong about this.
II)
I need help setting up the OpenCV with geany, does anyone have experience with this?
I have a project I'm writing that uses LuaJIT. I'm trying to run my project on a computer I have not run it on in a while. It used to run just fine but now when I try to run it it complains.
I have LuaJIT in my source tree, and it builds just fine. I'm using CMake to generate my make files, and as far as I can tell CMake finds the file libluajit.so, but when I run my program, I get the following error:
../build/game/game: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory
I don't know why it's looking for that version of the library instead of libluajit.so. This is Ubuntu linux for what it's worth. I can add more details if necessary, I can add more details if necessary, I'm not sure what info would be helpful to figure out happening.
Edit:
To build and link the program I have these lines in the file CMakeLists.txt (this is abbreviated a bit to just show the relevant bits)
find_package(LuaJIT REQUIRED)
set(Extern_LIBS luajit)
add_executable(proj ${proj_Sources})
target_link_libraries(proj ${Extern_LIBS})
After I run cmake on my source directory, I run make. Then to run it I just run ./proj
When you built it, the ".so" was actually a symlink to the library. Verisioned filenames and SONAMEs are used so that multiple versions of a library can coexist, preventing problems commonly found on... other operating systems whereby older software is incompatible with the newer library, and newer software is incompatible with the older library.