I've been using Ubuntu for a couple of years now and a problem that I consistently come across is with linking against particular versions of shared object files. For example, I'm trying to install igraph and it's giving me an error stating that it can't find the library lxml2. I have the synaptic libxml2 package installed, so I just need to find the shared objects and set up the links. So here's how I solve the problem:

jake@linux:~/code/rl/setup$ locate libxml2.so

jake@linux:~/code/rl/setup$ sudo ln -sf /usr/lib/x86_64-linux-gnu/libxml2.so.2 /usr/lib/x86_64-linux-gnu/libxml2.so

This kind of issue happens all the time and it seems like it's something that the OS should handle. So I end up asking myself, "Why isn't the linker looking for specific versions of shared objects? Why isn't synaptic creating these links on its own?"

Is there some better way of handling these issues? Is there a tool, or a best practice, or some other solution so that I don't have to repeatedly find and link my SOs manually? Or am I looking at this the wrong way?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.