CentOS7編譯核心make menuconfig報錯解決辦法
阿新 • • 發佈:2019-01-10
背景
在鳥哥的linux私房菜(第四版)中,練習使用linux核心的編譯與安裝,鳥哥用的是 make menuconfig
命令。在這個練習操作中出現了錯誤,原因是:
1: 這個命令(make menuconfig
)是在文字模式中使用的,而不是圖形介面使用的,在圖形介面使用不會出現那個藍色框,所以應該按 Ctrl + Alt + F2 進入文字模式操作;
2: 在文字模式介面中執行 make menuconfig
報錯,提示缺少ncurses庫。報錯如下:
* Unable to find the ncurses libraries or the
* required header files.
* ‘make menuconfig’ requires the ncurses libraries.
* Install ncurses (ncurses-devel) and try again.
make[1]: * [scripts/kconfig/dochecklxdialog] Error 1
make: * [menuconfig] Error 2
解決方法
解決方法十分簡單,就是安裝相關庫:
在文字模式介面(注意是文字模式介面而不是圖形介面)執行安裝命令 yum install ncurses ncurses-devel
即可。然後在執行 make menuconfig
就會出現那個藍色選擇框。