Reputation: 4745
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.
Upvotes: 35
Views: 57533
Reputation: 68818
Many people in recent time might hit this error on nodes such as GH200 which are built for ARM and things are pre-installed in certain way (for example, nodes rented from Lambda), if you have set LD_LIBRARY_PATH
etc variables in your .bashrc as usual. If you remove those, error will go away.
Upvotes: 0
Reputation: 462
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
Upvotes: 2
Reputation: 4745
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.
Upvotes: 60
Reputation: 1724
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.
Upvotes: 8