9/17/22

Update htop to latest version on Rock PI

When you quit from htop on rock pi you receive something like this: 

htop 2.2.2 aborting. Please report bug at http://hisham.hm/htop

 Please include in your report the following backtrace:
htop(CRT_handleSIGSEGV+0x44)[0x55828252b4]
linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0x7fae27e5ac]
/lib/aarch64-linux-gnu/libc.so.6(fclose+0x8)[0x7fae010280]
htop(Platform_getIO_stats+0x208)[0x55828224d8]
htop(main+0x508)[0x558280df98]
/lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe8)[0x7fadfcde10]
htop(+0xe150)[0x558280e150]

Additionally, in order to make the above backtrace useful,
please also run the following command to generate a disassembly of your binary:

   objdump -d `which htop` > ~/htop.objdump

and then attach the file ~/htop.objdump to your bug report.

Thank you for helping to improve htop!

Aborted


How to fix ? It's several steps to fix the error: 

 #1 Install dependencies 

 sudo apt-get install gcc make wget tar libncursesw5 libcunit1-ncurses libncursesw5-dev python automaker 

 #2 Download latest version of htop 

 wget https://github.com/htop-dev/htop/releases/download/3.2.1/htop-3.2.1.tar.xz 

 #3 Unpack archive

 tar -xvf htop-3.2.1.tar.xz
 cd htop-3.2.1

 #4 Build htop 

 bash autogen.sh
./configure
sudo make install 

 #5 Check the version 

 htop --v