Re: strange situation installing SDL
Pete <[email protected]>
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <[email protected]> |
On 2016年09月28日 12:54, bilsch01 wrote: > Using 32-bit Ubuntu 14.04 and installing SDL2-2.0.4 from source. > The SDL libraries were installed in /usr/local/lib but at runtime my > SDL program cant find the shared library libSDL2-2.0.so.0. I ran > STRACE and found that the program searches in several directories for > the shared library but doesn't find it anywhere. One of the paths > searched is /usr/lib, so I copied the library there and the program > runs fine. The problem here is that /usr/local/lib is probably not specified in your /etc/ld.so.conf (or one of the files in /etc/ld.so.conf.d). This sets the paths for the loader to look for shared libraries to load. You can add it there, or create a file under that directory that adds /usr/local/lib to the path. Most Linux distributions have the path in there by default, but sometimes they do not. It's worth noting that after you alter that, you will have to run ldconfig (as root) for the changes to take effect. > QUESTION: why does SDL install to a directory that is not > searched? /usr/local is a fairly standard prefix for autotools-based packages (like SDL) to use. The idea (sort of) is that the OS package manager is in charge of /usr, but does not install or remove files found under /usr/local, and that this (hopefully) prevents conflicts between locally installed software and software that your package manager installs. _______________________________________________ SDL mailing list [email protected] http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org