编译linux2.6.22时的错误

本文记录了在使用Linux内核makemenuconfig配置时遇到的一系列错误,并提供了详细的解决方案,主要是通过安装libncurses5-dev来解决由缺失依赖导致的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

lhbdesktop:/usr/src/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 鈉htype?
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 鈊ialog_checklist?
scripts/kconfig/lxdialog/checklist.c:116: error: 釽INDOW?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: 鈊ialog?undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:116: error: 鈒ist?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 鈍etmaxy?
scripts/kconfig/lxdialog/checklist.c:129: error: 鈙tdscr?undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:130: error: 釱EY_MAX?undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:131: warning: implicit declaration of function 鈍etmaxx?
scripts/kconfig/lxdialog/checklist.c:137: error: 釩OLS?undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:138: error: 釲INES?undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:140: warning: implicit declaration of function 鈊raw_shadow?
scripts/kconfig/lxdialog/checklist.c:142: warning: implicit declaration of function 鈔ewwin?
scripts/kconfig/lxdialog/checklist.c:143: warning: implicit declaration of function 鈑eypad?
scripts/kconfig/lxdialog/checklist.c:143: error: 釺RUE?undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:145: warning: implicit declaration of function 鈊raw_box?
scripts/kconfig/lxdialog/checklist.c:146: error: 鈙truct dialog_color?has no member named 鈇tr?
scripts/kconfig/lxdialog/checklist.c:146: error: 鈙truct dialog_color?has no member named 鈇tr?
scripts/kconfig/lxdialog/checklist.c:147: warning: implicit declaration of function 鈝attrset?
scripts/kconfig/lxdialog/checklist.c:147: error: 鈙truct dialog_color?has no member named 鈇tr?
scripts/kconfig/lxdialog/checklist.c:148: warning: implicit declaration of function 鈓vwaddch?
scripts/kconfig/lxdialog/checklist.c:150: warning: implicit declaration of function 鈝addch?
scripts/kconfig/lxdialog/checklist.c:151: error: 鈙truct dialog_color?has no member named 鈇tr?
scripts/kconfig/lxdialog/checklist.c:154: warning: implicit declaration of function 鈖rint_title?
scripts/kconfig/lxdialog/checklist.c:156: error: 鈙truct dialog_color?has no member named 鈇tr?
scripts/kconfig/lxdialog/checklist.c:157: warning: implicit declaration of function 鈖rint_autowrap?
scripts/kconfig/lxdialog/checklist.c:164: warning: implicit declaration of function 鈙ubwin?
scripts/kconfig/lxdialog/checklist.c:171: error: 鈙truct dialog_color?has no member named 鈇tr?
scripts/kconfig/lxdialog/checklist.c:171: error: 鈙truct dialog_color?has no member named 鈇tr?
scripts/kconfig/lxdialog/checklist.c:189: warning: implicit declaration of function 鈖rint_item?
scripts/kconfig/lxdialog/checklist.c:192: warning: implicit declaration of function 鈖rint_arrows?
scripts/kconfig/lxdialog/checklist.c:195: warning: implicit declaration of function 鈖rint_buttons?
scripts/kconfig/lxdialog/checklist.c:197: warning: implicit declaration of function 鈝noutrefresh?
scripts/kconfig/lxdialog/checklist.c:199: warning: implicit declaration of function 鈊oupdate?
scripts/kconfig/lxdialog/checklist.c:202: warning: implicit declaration of function 鈝getch?
scripts/kconfig/lxdialog/checklist.c:210: error: 釱EY_UP?undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:210: error: 釱EY_DOWN?undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:220: error: 釬ALSE?undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:221: warning: implicit declaration of function 鈙crollok?
scripts/kconfig/lxdialog/checklist.c:222: warning: implicit declaration of function 鈝scrl?
scripts/kconfig/lxdialog/checklist.c:232: warning: implicit declaration of function 鈝refresh?
scripts/kconfig/lxdialog/checklist.c:293: warning: implicit declaration of function 鈊elwin?
scripts/kconfig/lxdialog/checklist.c:297: error: 釱EY_LEFT?undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:298: error: 釱EY_RIGHT?undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:310: warning: implicit declaration of function 鈕n_key_esc?
scripts/kconfig/lxdialog/checklist.c:312: error: 釱EY_RESIZE?undeclared (first use in this function)
make[1]: *** [scripts/kconfig/lxdialog/checklist.o] Error 1

解决方法:安装libncurses5-dev

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值