22

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.

adamconkey
  • 4,104
  • 5
  • 32
  • 61

3 Answers3

36

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.

adamconkey
  • 4,104
  • 5
  • 32
  • 61
  • 7
    Thank you! `conda install -c conda-forge ncurses` solved my problem! – Eduardo Reis Jun 14 '22 at 16:27
  • Cool, I will update my answer to include the command line command – adamconkey Jun 14 '22 at 17:44
  • Also see https://stackoverflow.com/a/63730734/6338809 if you are building ncurses from source – Joe' Jul 06 '22 at 20:19
  • I had same the problem with the fish shell `fish: /.../miniconda/bin/../lib/libtinfo.so.6: no version information available (required by fish)` Just in case someone is searching for this :) – axsk Sep 06 '22 at 09:28
  • 3
    Running that same install procedure did not fix it. Samtools runs successfully, but always produces the same 3 lines of errors about `libncursesw.so.6` (twice) and `libtinfow.so.6`. – Glubbdrubb Sep 21 '22 at 08:06
7

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.

whilrun
  • 1,701
  • 11
  • 21
  • 1
    Thanks for the input, these are good suggestions but didn't work in my particular case. – adamconkey Jun 01 '22 at 15:47
  • I ran into this error while trying to use [Facebook's Masked Autoencoder notebook] https://colab.research.google.com/github/facebookresearch/mae/blob/main/demo/mae_visualize.ipynb Specifically while I was trying to git clone the repo. To avoid the problematic conda library, I located where libtinfo.so.6 was on my computer and added it to LD_LIBRARY_PATH as @whilrun mentioned. To solve my issue, I did `!LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH git clone https://github.com/facebookresearch/mae.git` This removed the error. – user3731622 Mar 02 '23 at 03:36
2

My installation of conda came from an installation of The Littlest JupyterHub (TLJH). Updating the ncurses package did not resolve the error messages for me in Jupyter Notebook instances. Following from @whilrun's answer, I simply made a backup of libtinfo and symbolic links,

sudo mv /opt/tljh/user/lib/libtinfo.so.6 /opt/tljh/user/lib/libtinfo.so.6.bak
sudo mv /opt/tljh/user/lib/libtinfo.so /opt/tljh/user/lib/libtinfo.so.bak
sudo mv /opt/tljh/user/lib/libtinfo.so.6.2 /opt/tljh/user/lib/libtinfo.so.6.2.bak
JDQ
  • 443
  • 7
  • 11