When in conda, tmux and emacs throw "error while loading shared libraries: libtinfo.so.6"
Asked Answered
J

2

10

I've installed and updated tmux and emacs via conda in my default environment, and have these versions in conda list:

# packages in environment at /home/maxghenis/miniconda3:
#
# Name                    Version                   Build  Channel
tmux                      2.7                  hc78d2af_1    conda-forge
emacs                     26.1                 h3a2ea38_1    conda-forge

Yet when trying to start either tmux or emacs, I get this error:

error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory

Per error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory I have 5 libtinfo files:

(xenial)maxghenis@localhost:~$ sudo find / -name "libtinfo.so"
/home/maxghenis/miniconda3/pkgs/ncurses-5.9-10/lib/libtinfo.so
/home/maxghenis/miniconda3/pkgs/ncurses-6.1-hf484d3e_0/lib/libtinfo.so
/home/maxghenis/miniconda3/envs/tidycensus/lib/libtinfo.so
/home/maxghenis/miniconda3/lib/libtinfo.so

(xenial)maxghenis@localhost:/lib$ sudo find / -name "libtinfo.so.6"
/lib64/libtinfo.so.6
Janellajanelle answered 18/7, 2018 at 18:25 Comment(7)
Well, I'm not sure why linking libgsl.so would help, since libtinfo.so is missing... also, the find command error message is because the predicate is spelled with a lowercase n in name, and you should probably look for libtinfo instead of libgsl...Peacock
There's also this thread: forums.opensuse.org/showthread.php/…Peacock
But you don't need libgsl.so, you need libtinfo.so. Why are you searching for libgsl?Peacock
My mistake - that question came up in my search so I thought the files were related, but I see they're not. Updated the question with the 4 results of sudo find / -name "libtinfo.so".Janellajanelle
Could you try installing ncurses into your base environment?Peacock
Same tmux error after running conda install ncurses.Janellajanelle
Just offered a bounty. Here's my ncurses installation info from conda list: # Name Version Build Channel ncurses 6.1 hf484d3e_0 Janellajanelle
C
2

Same issue. The following has worked out:

$ pwd
<anaconda_installation_dir>

$ ./bin/tmux
(error)


$ find . -name "libtinfo*"
...
./lib/libtinfo.so  # this is the needed shared lib shipped deployed by  conda, just need it been found
...

$ ln -s `readlink -f ./lib/libtinfo.so` `readlink -f ./lib/libtinfo.so | sed '[email protected][email protected]@'`
$ find . -name "libtinfo*"
...
./lib/libtinfo.so  # original lib
./lib/libtinfo.so.6  # the new one which is a symlink
...

$ ./bin/tmux
(ok)

As to why this may be desired -- my case is working in a sort of administratively "hostile" environment when I don't have access to fast on-demand package deployment (as well as root/sudi as well, of course) but still need screen-like solution.

Conscription answered 18/12, 2018 at 12:48 Comment(0)
E
1

You may need a package libncurses6. When you search for the library, you should look for files

find / -name "libtinfo.so*" -ls

The file libtinfo.so is only used when creating an executable, and is typically a symlink to the actual library. It is not needed to run a program. The file "libtinfo.so.6" is also often a symlink to the actual library. On my system, it is

/lib64/libtinfo.so.6 -> libtinfo.so.6.1

As tmux and emacs are system utilities and it's not likely that you want to use different versions of them, why don't you install them in the base system without conda?

Economist answered 30/7, 2018 at 20:8 Comment(2)
Here's my result of that command. Installing without conda (apt-get) produces this error when launching: -bash: /home/maxghenis/miniconda3/bin/emacs: No such file or directory Here's the result of find for emacs.Janellajanelle
Turns out they were being installed to /usr/bin which wasn't in my $PATH. Here are my commands for resolving it, both for emacs and tmux. So this works as an alternative, but I'm still curious how to use the conda versions.Janellajanelle

© 2022 - 2024 — McMap. All rights reserved.