tjunier / newick_utils

shell tools for processing phylogenetic trees
Other
101 stars 31 forks source link

Compilation: error while loading shared libraries: libnw.so.0 #19

Open Gullumluvl opened 7 years ago

Gullumluvl commented 7 years ago

Hi,

I am quite a regular user of newick_utils, but I had a problem when trying to install on a new machine.

I managed to use the binaries, but when performing the compilation (on Ubuntu 16.04) the resulting executables fail.

I compiled using the indicated steps:

$ autoreconf -fi
$ ./configure
$ make
$ make check    # optional but recommended
$ sudo make install

It seems to work, but then calling nw_labels -h for example, it throws me this error:

nw_labels: error while loading shared libraries: libnw.so.0: cannot open shared object file: No such file or directory

I would very much like to know how to solve this problem... Thanks a lot!

cksajil commented 6 years ago

I am also getting the same error (Ubuntu 14.04). Is there any update on this?

Also is there a documentation available for the newick_utils 1.6 Anaconda package?

dargim commented 6 years ago

I had the same problem and solved it by adding the libraries folder to $LD_LIBRARY_PATH and executing ldconfig.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
sudo ldconfig
nylander commented 2 years ago

Hi, The shared object file is installed in /usr/local/lib, which, apparently, is not part of the path where Ubuntu (20.04) looks for libraries to include at runtime. One solution is to add /usr/local/lib to the library path by using ldconfig. A good description is given here:

https://stackoverflow.com/questions/17889799/libraries-in-usr-local-lib-not-found

Another hack is to link/copy the so file to a folder that is in the library path . The linked solution is, however, recommended.