본문 바로가기

3-1. Linux/::Configuration::

Centos 5.x에서 #make menuconfig가 안될때

리눅스를 설치할때 기본으로 설치했더니.... 안깔린게 무쟈게 많다...
나같은 경우는 필요한 커널옵션이 있어서 소스컴파일하고 make menuconfig 하는 부문에서 발생했다.

에러의 원인은 make menuconfig 을 실행할때 
먼저 커널소스에  /usr/src/linux/scripts/kconfig/lxdialog check-lxdialog.sh 를 실행해서 ncurses 헤더와 라이브러리가 설치되어 있는지 확인한뒤 없으면 에러메세지를 띄우고 있으면 ncurses 헤더와 라이브러리를 써서 menuconfig프로그램(lxdialog)을 컴파일한뒤 옵션 설정 화면을 띄우게 되는데 이부분에서 에러가 발생한것이다.

ncurses 라이브러리는 콘솔또는 터미널 화면에서 그래픽 환경을 사용하기 위한것으로 GUI 환경에서 나름 그래픽 메뉴로 커널을 설정하기 위한 명령어이다.

아래와 같이 yum install 을 통해서 해결!!
Centos 5 needed to: yum install ncurses-devel  


config파일을 쉽게 만들기 위한 도구들이 커널 소스에 포함

make menuconfig(ncurses 프로그램)
make xconfig(qt 프로그램)
make gconfig(gtk 프로그램)



[root@localhost linux]# make menuconfig
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
In file included from scripts/kconfig/lxdialog/checklist.c:24:
scripts/kconfig/lxdialog/dialog.h:32:20: error: curses.h: No such file or directory
In file included from scripts/kconfig/lxdialog/checklist.c:24:
scripts/kconfig/lxdialog/dialog.h:97: error: expected specifier-qualifier-list before 'chtype'
scripts/kconfig/lxdialog/dialog.h:187: error: expected ')' before '*' token
scripts/kconfig/lxdialog/dialog.h:194: error: expected ')' before '*' token
scripts/kconfig/lxdialog/dialog.h:196: error: expected ')' before '*' token
scripts/kconfig/lxdialog/dialog.h:197: error: expected ')' before '*' token
scripts/kconfig/lxdialog/dialog.h:198: error: expected ')' before '*' token
scripts/kconfig/lxdialog/dialog.h:199: error: expected ')' before '*' token
scripts/kconfig/lxdialog/dialog.h:201: error: expected ')' before '*' token
scripts/kconfig/lxdialog/checklist.c:31: error: expected ')' before '*' token
scripts/kconfig/lxdialog/checklist.c:59: error: expected ')' before '*' token
scripts/kconfig/lxdialog/checklist.c:95: error: expected ')' before '*' token
scripts/kconfig/lxdialog/checklist.c: In function 'dialog_checklist':
scripts/kconfig/lxdialog/checklist.c:116: error: 'WINDOW' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:116: error: (Each undeclared identifier is reported only once
scripts/kconfig/lxdialog/checklist.c:116: error: for each function it appears in.)
scripts/kconfig/lxdialog/checklist.c:116: error: 'dialog' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:116: error: 'list' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:116: warning: left-hand operand of comma expression has no effect
scripts/kconfig/lxdialog/checklist.c:129: warning: implicit declaration of function 'getmaxy'
scripts/kconfig/lxdialog/checklist.c:129: error: 'stdscr' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:130: error: 'KEY_MAX' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:131: warning: implicit declaration of function 'getmaxx'
scripts/kconfig/lxdialog/checklist.c:137: error: 'COLS' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:138: error: 'LINES' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:140: warning: implicit declaration of function 'draw_shadow'
scripts/kconfig/lxdialog/checklist.c:142: warning: implicit declaration of function 'newwin'
scripts/kconfig/lxdialog/checklist.c:143: warning: implicit declaration of function 'keypad'
scripts/kconfig/lxdialog/checklist.c:143: error: 'TRUE' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:145: warning: implicit declaration of function 'draw_box'
scripts/kconfig/lxdialog/checklist.c:146: error: 'struct dialog_color' has no member named 'atr'
scripts/kconfig/lxdialog/checklist.c:146: error: 'struct dialog_color' has no member named 'atr'
scripts/kconfig/lxdialog/checklist.c:147: warning: implicit declaration of function 'wattrset'
scripts/kconfig/lxdialog/checklist.c:147: error: 'struct dialog_color' has no member named 'atr'
scripts/kconfig/lxdialog/checklist.c:148: warning: implicit declaration of function 'mvwaddch'
scripts/kconfig/lxdialog/checklist.c:150: warning: implicit declaration of function 'waddch'
scripts/kconfig/lxdialog/checklist.c:151: error: 'struct dialog_color' has no member named 'atr'
scripts/kconfig/lxdialog/checklist.c:154: warning: implicit declaration of function 'print_title'
scripts/kconfig/lxdialog/checklist.c:156: error: 'struct dialog_color' has no member named 'atr'
scripts/kconfig/lxdialog/checklist.c:157: warning: implicit declaration of function 'print_autowrap'
scripts/kconfig/lxdialog/checklist.c:164: warning: implicit declaration of function 'subwin'
scripts/kconfig/lxdialog/checklist.c:171: error: 'struct dialog_color' has no member named 'atr'
scripts/kconfig/lxdialog/checklist.c:171: error: 'struct dialog_color' has no member named 'atr'
scripts/kconfig/lxdialog/checklist.c:189: warning: implicit declaration of function 'print_item'
scripts/kconfig/lxdialog/checklist.c:192: warning: implicit declaration of function 'print_arrows'
scripts/kconfig/lxdialog/checklist.c:195: warning: implicit declaration of function 'print_buttons'
scripts/kconfig/lxdialog/checklist.c:197: warning: implicit declaration of function 'wnoutrefresh'
scripts/kconfig/lxdialog/checklist.c:199: warning: implicit declaration of function 'doupdate'
scripts/kconfig/lxdialog/checklist.c:202: warning: implicit declaration of function 'wgetch'
scripts/kconfig/lxdialog/checklist.c:210: error: 'KEY_UP' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:210: error: 'KEY_DOWN' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:220: error: 'FALSE' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:221: warning: implicit declaration of function 'scrollok'
scripts/kconfig/lxdialog/checklist.c:222: warning: implicit declaration of function 'wscrl'
scripts/kconfig/lxdialog/checklist.c:232: warning: implicit declaration of function 'wrefresh'
scripts/kconfig/lxdialog/checklist.c:293: warning: implicit declaration of function 'delwin'
scripts/kconfig/lxdialog/checklist.c:297: error: 'KEY_LEFT' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:298: error: 'KEY_RIGHT' undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:310: warning: implicit declaration of function 'on_key_esc'
scripts/kconfig/lxdialog/checklist.c:312: error: 'KEY_RESIZE' undeclared (first use in this function)
make[1]: *** [scripts/kconfig/lxdialog/checklist.o] Error 1
make: *** [menuconfig] Error 2