4

I'm currently using GPUs on an Ubuntu server to run machine learning models. I often like to use the watch command in order to monitor the GPU statuses like watch -n 1 nvidia-smi. It usually works fine, but I noticed that for one of the servers I get the error:

watch: /usr/local/lib/libncursesw.so.6: no version information available (required by watch)
watch: /usr/local/lib/libncursesw.so.6: no version information available (required by watch)
Segmentation fault (core dumped)

I've tried sudo apt-get install libncursesw6 and get libncursesw6 is already the newest version (6.2-0ubuntu2)..

Is there anything else I can do to fix this error?

Edit

The output of lddtree $PATH_TO_WATCH is:

watch => /usr/bin/watch (interpreter => /lib64/ld-linux-x86-64.so.2)
    libncursesw.so.6 => /usr/local/lib/libncursesw.so.6
        libtinfow.so.6 => /usr/local/lib/./libtinfow.so.6
    libtinfo.so.6 => /usr/local/lib/libtinfo.so.6
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
        ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
Sean
  • 181
  • What does lddtree path_to_watch tell ? – MC68020 Oct 17 '22 at 09:08
  • Also, does watch work with any other command? What happens if you run something like watch ls? – terdon Oct 17 '22 at 09:09
  • @MC68020 Unfortunately I don't have lddtree installed so I can't answer your question. – Sean Oct 17 '22 at 11:22
  • @terdon The same error happens when I run watch ls. :( – Sean Oct 17 '22 at 11:23
  • On my system (not ubuntu) watch comes with the procps package. You could try re-installing it. – MC68020 Oct 17 '22 at 11:35
  • @MC68020 I downloaded the pax-utils which enabled the lddtree command. I'll edit the output in the OP. – Sean Oct 17 '22 at 21:06
  • @MC68020 Also, when I try to install procps it says that the newest version (2:3.3.16-1ubuntu2.3) is already installed. – Sean Oct 17 '22 at 21:16
  • OK, all this appears perfectly fine to me. BTW your process is segfaulting. I doubt this is immediately linked to the inability to find information version. Any info available in dmesg about that segfault ? (trace dump…) – MC68020 Oct 17 '22 at 21:26
  • I get this error on all apps requiring libncursesw.so.6 in Ubuntu 22.04. Running them as root seems to fix the issue, which is unacceptable, but I haven't figured out what the offending (permission?) issue is. – shellcat_zero Jan 26 '23 at 12:56

1 Answers1

0

It turns out that not only did the watch command cause this, but htop was also causing this error. An old coworker of mine managed to help me out by telling me that I had to run the following commands:

sudo rm -f /usr/local/lib/libncursesw.so.6
sudo ln -s /lib/x86_64-linux-gnu/libncursesw.so.6 /usr/local/lib/libncursesw.so.6

I guess there was a conflict between a previous library and the symbolic link? If anyone has a better and more comprehensive understanding of this, please feel free to edit my answer.

Sean
  • 181