top命令查看CPU利用率並非很方便,所以打算移植htop到imx6上,主要包括如下幾個步驟:linux
首先須要編譯libncurses ./configure --prefix=/home/vincent/resouces/nc --without-cxx --without-cxx-binding --without-ada --without-manpages --without-progs --without-tests --with-shared --host=arm-none-linux-gnueabi make -j16 make install 以後編譯htop ./configure --prefix=/home/vincent/resouces/ht --disable-unicode --host=arm-none-linux-gnueabi LDFLAGS=-L/home/vincent/resouces/nc/lib/ CPPFLAGS="-I/home/vincent/resouces/nc/include/ncurses -I/home/vincent/resouces/nc/include/" make -j16 make install htop在configure的時候報錯,因此頭文件目錄設置了兩個
將ncurses庫以及htop命令複製到板子上,設置PATH和LD_LIBRARY_PATH
執行htop遇到 vt102 打不開 解決: 查看TERM和TERMINFO環境變量是否設置,若是沒有,執行: export TERM=vt102 export TERMINFO=/usr/share/terminfo