libtinfo.so.6: no version information available message using conda environment

Viewed 3099

I have a conda environment setup and had to set my LD_LIBRARY_PATH like this:

export LD_LIBRARY_PATH=$HOME/.miniconda3/envs/ll4ma/lib:$LD_LIBRARY_PATH

However as soon as I did this, I started getting my terminal flooded with this message:

/bin/bash: /home/ll4ma/.miniconda3/envs/ll4ma/lib/libtinfo.so.6: no version information available (required by /bin/bash)

Any idea how to fix this? I'm building some code for ROS with catkin and this message gets printed maybe 20 times in the process, which makes the terminal output very hard to look at.

2 Answers

It turns out that the version of libtinfo (installed as part of ncurses) doesn't provide its version info as suggested in this related answer. I was able to resolve this by forcing ncurses to be installed from the conda-forge channel instead of the default. In my YAML config for my conda env I simply did this:

dependencies:
  - conda-forge::ncurses

If installing from command line you can do

conda install -c conda-forge ncurses

If you don't specify the channel then you would need to set the channel priority as described here so that it will give priority to conda-forge.

Using the version of ncurses from conda-forge instead of the default got rid of the message that was spamming my terminal, because the conda-forge one ships with version information as described here.

It's likely that your conda environment has an older libtinfo.so.6 library and when you export conda path to LD_LIBRARY_PATH every program in this session that requires libtinfo.so.6 will load library from your conda environment. Now when bash wants to load libtinfo.so.6, it expects a newer version with specific symbol in it, but the library from conda doesn't provide that symbol, so ld is complaining that no version information available.

If you are running an executable or you are compiling a program that requires this library, you can simply append the environment variable before the program you are running. For example, LD_LIBRARY_PATH=$HOME/.miniconda3/envs/ll4ma/lib:$LD_LIBRARY_PATH /bin/bash will run bash using the LD_LIBRARY_PATH specified before it. This will limit the scope of changed environment variable to this line so your global environment is not affected. Another way to solve the problem is to simply delete libtinfo.so.6 in your conda environment (make sure to make a backup before deleting it) and test if your program can still run. In many cases the libraries are designed to be ABI compatible so use a newer version of library won't break anything.

Related