配置内核 make menuconfig时报错 Unable to find the ncurses libraries or the required header files.

配置内核 make menuconfig时报错 Unable to find the ncurses libraries or the required header files.
*** 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

执行sudo apt-get install libncurses*后提示配置内核 make menuconfig时报错 Unable to find the ncurses libraries or the required header files.
然后更新安装包:sudo apt-get install update:配置内核 make menuconfig时报错 Unable to find the ncurses libraries or the required header files.
然后不能更新包,检查后发现没有联网,然后联网后,还是同样的问题
下一步,更新Ubuntu的 ‘ 源’ 换成国内的 ’源‘‘。换成国内的源之前先要备份之前的源:
1,sudo cp /etc/apt/source.list/ /etc/apt/source.list.bak
2, vi /etc/apt/sources.list
把原来的官方源全部删除,替换成下面的:

deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
保存退出
再更新: sudo apt-get install update
成功后,
再执行 sudo apt-get install libncurses*
执行成功后
再执行:sudo apt-get install ncurses
最后再执行 make menuconfig 配置内核 成功弹出菜单配置内核 make menuconfig时报错 Unable to find the ncurses libraries or the required header files.