'Segfault using htop on AWS Sagemaker pytorch-1.10-cpu-py38 app

I am trying to launch the htop command in the Pytorch 1.10 - Python 3.8 CPU optimized AWS Sagemaker container. This works fine in other images I have used till now, but in this one, the command fails with a segfault:

htop 
htop: /opt/conda/lib/libncursesw.so.6: no version information available (required by htop) 
htop: /opt/conda/lib/libncursesw.so.6: no version information available (required by htop) 
htop: /opt/conda/lib/libncursesw.so.6: no version information available (required by htop) 
Segmentation fault (core dumped)

More info :

htop --version
htop: /opt/conda/lib/libncursesw.so.6: no version information available (required by htop)
htop: /opt/conda/lib/libncursesw.so.6: no version information available (required by htop)
htop: /opt/conda/lib/libncursesw.so.6: no version information available (required by htop)
htop 2.2.0 - (C) 2004-2019 Hisham Muhammad
Released under the GNU GPL.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source