前言
在 RPM 規格之前,在 linux 上安裝軟體都必須使用原始碼編譯的方式,而現在未被 centos 支援的軟體,仍需要做編譯的動作

htop 安裝步驟

1. 請在 http://sourceforge.net/projects/htop/ 複製下載的網址,並使用 wget 下載到 /tmp 下
# wget http://sourceforge.net/projects/htop/files/latest/download

2. 解壓縮
# tar zxvf tar zxvf htop-1.0.2.tar.gz

3. 閱讀 README 及 INSTALL
書裡面提到,通常軟體都會有 README 及 INSTALL
README 通常是軟體的介紹,而 INSTALL 則是編譯與安裝的步驟說明

4. 安裝 ncurses-devel
# yum -y install ncurses-devel
(目前不清楚是不是每個軟體都需要)

5. 執行 configure 執行檔,並查看有無錯誤訊息
# ./configure

  我第一次執行的時候,出現下面的訊息
  checking for gcc... no
  checking for cc... no
  checking for cl.exe... no
  configure: error: in `/tmp/htop-1.0.2':
  configure: error: no acceptable C compiler found in $PATH
  See `config.log' for more details.
  於是我安裝了 gcc ,之後再執行就正常了

6. 編譯與安裝
# make
# make install

7. 執行 htop
htop  

arrow
arrow
    全站熱搜

    wbkuo 發表在 痞客邦 留言(0) 人氣()