今天想用一下uboot下的make menuconfig。发现make fail.
具体情况如下:
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
scripts/kconfig/Makefile:200: recipe for target 'scripts/kconfig/dochecklxdialog ' failed
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
Makefile:477: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2
一开始以为报错的是ncures-devel 。所以执行了sudo apt-get install ncures-devel.
可是问题仍然报错:
E: Unable to locate package ncurses-devel
以为是自己DNS没有配置。所以又找了这一片文章
[Ubuntu 18.04][resolv.conf]公共DNS设置 - Network Guide (zj-network-guide.readthedocs.io)
后来发现自己文件目录下没有这个文件/run/systemd/resolve/resolv.conf。
但是自己sudo apt-get update 仍然出现问题,问题如下:
Err:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease
Temporary failure resolving 'cn.archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu xenial-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:3 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease
Temporary failure resolving 'cn.archive.ubuntu.com'
所以看网上的文章配置,有一篇这个文章 (71条消息) Ubuntu apt-get install出现“Temporary failure resolving 'cn.archive.ubuntu.com'”_奔狼的春晓的博客-CSDN博客配置自己的DNS.内容添加如下:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 1.0.0.127
nameserver 114.114.114.115
nameserver 8.8.8.8
添加nameserver 114.114.114.114和8.8.8.8
然后执行 nslookup www.baidu.com
darton@darton:~/MYS6ULx-devel/04-Source/MYiR-iMX-uboot$ nslookup www.baidu.com
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
www.baidu.com canonical name = www.a.shifen.com.
Name: www.a.shifen.com
Address: 112.80.248.76
Name: www.a.shifen.com
Address: 112.80.248.75
执行sudo apt-get update , 这个update问题解决。
在网上看到的说:
这个情况是一样的,同样遇到相同的错误:
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
scripts/kconfig/Makefile:200: recipe for target 'scripts/kconfig/dochecklxdialog' failed
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
Makefile:477: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2
然后执行 sudo apt-get install libncurses5-dev libncursesw5-dev,由于第一个装过了。
执行了一下 sudo apt-get install libncursesw5-dev。 问题解决