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
Max Ghenis
  • 14,783
  • 16
  • 84
  • 132
  • 1
    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`... – darthbith Jul 18 '18 at 20:40
  • There's also this thread: https://forums.opensuse.org/showthread.php/446927-missing-library-libtinfo-so-5 – darthbith Jul 18 '18 at 20:41
  • 1
    But you don't need `libgsl.so`, you need `libtinfo.so`. Why are you searching for libgsl? – darthbith Jul 19 '18 at 01:25
  • 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"`. – Max Ghenis Jul 19 '18 at 01:44
  • Could you try installing ncurses into your base environment? – darthbith Jul 19 '18 at 13:05
  • Same `tmux` error after running `conda install ncurses`. – Max Ghenis Jul 19 '18 at 15:50
  • Just offered a bounty. Here's my `ncurses` installation info from `conda list`: `# Name Version Build Channel ncurses 6.1 hf484d3e_0 ` – Max Ghenis Jul 25 '18 at 14:50

2 Answers2

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 's@libtinfo.so$@libtinfo.so.6@'`
$ 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.

DimG
  • 1,641
  • 1
  • 16
  • 23
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?

RalfFriedl
  • 1,134
  • 3
  • 11
  • 12
  • Here's my [result](https://gist.github.com/MaxGhenis/b5dbe934b4aa3c1534c8d1c0c3ca1b28) 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](https://gist.github.com/MaxGhenis/fe60699c66069a4b90faf6ddde6745af) of `find` for emacs. – Max Ghenis Jul 31 '18 at 19:26
  • Turns out they were being installed to `/usr/bin` which wasn't in my `$PATH`. [Here](https://gist.github.com/MaxGhenis/d7846976254f2e1b63dda9769ac36606) 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. – Max Ghenis Aug 01 '18 at 04:02