【已解决】Ubuntu中配置crosstool-ng出错:configure: error: could not find curses header, required for the kconfig frontends

【问题】

折腾:

【记录】在Ubuntu下用crosstool-ng编译xscale的交叉工具链

期间,配置出错:

crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ ./configure --prefix=/opt/crosstool-ng
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking whether sed understands -r -i -e... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for objcopy... objcopy
checking for absolute path to objcopy... /usr/bin/objcopy
checking for objdump... objdump
checking for absolute path to objdump... /usr/bin/objdump
checking for readelf... readelf
checking for absolute path to readelf... /usr/bin/readelf
checking for bison... bison
checking for flex... flex
checking for gperf... gperf
checking for makeinfo... makeinfo
checking for cut... cut
checking for stat... stat
checking for readlink... readlink
checking for wget... wget
checking for tar... tar
checking for gzip... gzip
checking for bzip2... bzip2
checking for patch... /usr/bin/patch
checking for bash >= 3.1... /bin/bash
checking for GNU awk... /usr/bin/awk
checking for GNU make >= 3.80... /usr/bin/make
checking whether /usr/bin/make sets $(MAKE)... yes
checking for GNU libtool >= 1.5.26... /usr/bin/libtool
checking for GNU libtoolize >= 1.5.26... /usr/bin/libtoolize
checking for GNU automake >= 1.10... /usr/bin/automake
checking for xz... xz
checking for cvs... no
checking for svn... no
checking for inline... inline
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for working alloca.h... yes
checking for alloca... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking whether gettext is declared... yes
checking ncurses/ncurses.h usability... no
checking ncurses/ncurses.h presence... no
checking for ncurses/ncurses.h... no
checking ncurses/curses.h usability... no
checking ncurses/curses.h presence... no
checking for ncurses/curses.h... no
checking ncursesw/curses.h usability... no
checking ncursesw/curses.h presence... no
checking for ncursesw/curses.h... no
checking ncurses.h usability... no
checking ncurses.h presence... no
checking for ncurses.h... no
checking curses.h usability... no
checking curses.h presence... no
checking for curses.h... no
configure: error: could not find curses header, required for the kconfig frontends
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ sudo apt-get install kconfig
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package kconfig
 

即:

configure: error: could not find curses header, required for the kconfig frontends

【解决过程】

1.参考:

【已解决】Ubuntu中用sudo apt-get install安装某软件,结果出错:E: Unable to locate package makeinfo

去看看,kconfig是属于哪个软件包的,结果也还是看不懂:

crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ kconfig
No command 'kconfig' found, did you mean:
 Command 'ksconfig' from package 'system-config-kickstart' (main)
 Command 'zconfig' from package 'python-zconfig' (universe)
 Command 'mconfig' from package 'mono-devel' (main)
 Command 'vconfig' from package 'vlan' (main)
 Command 'fconfig' from package 'redboot-tools' (main)
kconfig: command not found
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ 

 

2.网上搜了下,参考:

Getting webcam to stream on RPi over WiFi [draft]

去先搜索一下ncurses:

crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ apt-cache search ncurses
iptraf - Interactive Colorful IP LAN Monitor
libncurses5 - shared libraries for terminal handling
libncurses5-dbg - debugging/profiling libraries for ncurses
libncurses5-dev - developer's libraries for ncurses
libncursesw5 - shared libraries for terminal handling (wide character support)
libncursesw5-dbg - debugging/profiling libraries for ncursesw
libncursesw5-dev - developer's libraries for ncursesw
libtinfo-dev - developer's library for the low-level terminfo library
libtinfo5 - shared low-level terminfo library for terminal handling
libtinfo5-dbg - debugging/profiling library for the low-level terminfo library
mtr-tiny - Full screen ncurses traceroute tool
nano - small, friendly text editor inspired by Pico
ncurses-base - basic terminal type definitions
ncurses-bin - terminal-related programs and man pages
ncurses-doc - developer's guide and documentation for ncurses
ncurses-examples - test programs and examples for ncurses
ncurses-term - additional terminal type definitions
whiptail - Displays user-friendly dialog boxes from shell scripts
lib64ncurses5 - shared libraries for terminal handling (64-bit)
lib64ncurses5-dev - developer's libraries for ncurses (64-bit)
lib64tinfo5 - shared low-level terminfo library for terminal handling (64-bit)
ydpdict - interface for Collins and Langenscheidt dictionaries
abook - text-based ncurses address book application
apt-dater - terminal-based remote package update manager
apt-dater-dbg - terminal-based remote package update manager (dbg symbols)
apt-dater-host - host helper application for apt-dater
audtty - ncurses based frontend to audacious
aumix - Simple text-based mixer control program
aumix-common - Simple text-based mixer control program (common files)
aumix-gtk - Simple mixer control program with GUI and text interfaces
aylet - ncurses-based player for Spectrum '.ay' music files
bastet - ncurses Tetris clone with a bastard algorithm
bochs-term - Terminal (ncurses-based) plugin for Bochs
btscanner - ncurses-based scanner for Bluetooth devices
canto - flexible ncurses Atom/RSS newsreader for the console
cdw - Tool for burning CD's - console version
centerim-utf8 - A text-mode multi-protocol instant messenger client
clex - command line file manager which uses the ncurses library
cmus - lightweight ncurses audio player
cmus-plugin-ffmpeg - lightweight ncurses audio player (FFmpeg plugin)
colortest-python - utility to test color capabilities of terminal
conky-cli - highly configurable system monitor (basic version)
cpm - Curses based password manager using PGP-encryption
cwcp - Morse code tutor - text user interface
dares - rescue files from damaged CDs and DVDs (ncurses-interface)
dav-text - A minimalist ncurses-based text editor
dhex - ncurses based hex editor with diff mode
ekg - console Gadu Gadu client for UNIX systems - ncurses UI
ekg-gtk - Gadu Gadu client for UNIX systems - GTK+ UI
ekg2 - instant messenger and IRC client for UNIX systems
ekg2-ui-ncurses - instant messenger and IRC client for UNIX systems - ncurses interface
fbb - Packet radio mailbox and utilities
fp-units-base-2.4.4 - Free Pascal - base units
gaduhistory - EKG history viewer
gom - Command line and interactive ncurses-based OSS audio mixer
gopher - Distributed Hypertext Client, Gopher protocol
gtypist - simple ncurses touch typing tutor
hatop - interactive ncurses client for haproxy
hexcurse - A ncurses-based hex editor with many features
hnb - hierarchical notebook
imediff2 - interactive full screen 2-way merge tool
iselect - ncurses-based interactive line selection tool
juke - A curses-based jukebox program
libcunit1-ncurses - Unit Testing Library for C (ncurses)
libcunit1-ncurses-dev - Unit Testing Library for C (ncurses) -- development files
libcurses-ocaml-dev - OCaml bindings for the ncurses library
libcurses-perl - Curses interface for Perl
libcurses-widgets-perl - Curses widget interface for Perl
libggi-target-terminfo - General Graphics Interface TermInfo display target
libghc-hscurses-dev - ncurses bindings for Haskell - development files for GHC
libghc-hscurses-doc - ncurses bindings for Haskell - documentation
libghc-hscurses-prof - ncurses bindings for Haskell - profiling files for GHC
libkaya-ncurses-dev - Ncurses binding for kaya
libkaya-ncursesw-dev - Ncurses binding for kaya
libncurses-gst - Ncurses bindings for GNU Smalltalk
libncurses-ruby - Transitional package for ruby-ncurses
libncurses-ruby1.8 - Transitional package for ruby-ncurses
libncurses-ruby1.9 - Transitional package for ruby-ncurses
libncurses-ruby1.9.1 - Transitional package for ruby-ncurses
libncursesada-dbg - Ada binding to the ncurses text interface library: debug symbols
libncursesada-doc - Ada binding to the ncurses text interface library: documentation
libncursesada2 - Ada binding to the ncurses text interface library: shared library
libncursesada2-dev - Ada binding to the ncurses text interface library: development
libtexttools-dbg - Ada and C++ library for writing console applications: debug symbols
libtexttools-doc - Ada and C++ library for writing console applications: documentation
libtexttools3-dev - Ada and C++ library for writing console applications: development
libtexttools5 - Ada and C++ library for writing console applications: shared library
mdm - Utilities for single-host parallel shell scripting
moc - ncurses based console audio player
moc-ffmpeg-plugin - ncurses based console audio player - ffmpeg plugin
mtr - Full screen ncurses and X11 traceroute tool
multitail - view multiple logfiles windowed on console
nano-tiny - small, friendly text editor inspired by Pico - tiny build
nast - packet sniffer and lan analyzer
ncdu - ncurses disk usage viewer
ncmpc - ncurses-based audio player
ncmpc-lyrics - ncurses-based audio player (lyrics plugins)
ncmpcpp - ncurses-based client for the Music Player Daemon (MPD)
ncurses-hexedit - Edit files/disks in hex, ASCII and EBCDIC
ninvaders - A space invaders-like game using ncurses
nrss - A ncurses-based RSS reader
oping - sends ICMP_ECHO requests to network hosts
pacman4console - a console based pacman game
pinfo - An alternative info-file viewer
pms - Practical Music Search, an MPD client
pork - Console-based AOL Instant Messenger & IRC client
powerman - Centralized Power Distribution Unit (PDU) management
radio - ncurses-based radio application
ranger - File manager with an ncurses frontend written in Python
rtorrent - ncurses BitTorrent client based on LibTorrent from rakshasa
shed - A simple hex editor with a pico-style interface
siggen - Waveform generation tools
signing-party - Various OpenPGP related tools
sinfo - tool for monitoring computer clusters using broadcasts
smuxi-frontend-stfl - STFL frontend for Smuxi (experimental)
squidview - monitors and analyses squid access.log files
stymulator - Curses based player and converter for the YM chiptune format
tig - ncurses-based Git repository browser
tpp - text presentation program
trafshow - ncurses based utility showing detailed network traffic
tty-clock - simple terminal clock
tudu - Command line hierarchical ToDo list
vdr-plugin-examples - Plugins for vdr to show some possible features
vfu - A versatile text-based filemanager
vifm - a ncurses based file manager with vi like keybindings
whowatch - Real-time user logins monitoring tool
wyrd - text-based calendar application
yacpi - ncurses based acpi monitor for text mode
libx32ncurses5 - shared libraries for terminal handling (x32)
libx32ncurses5-dev - developer's libraries for ncurses (x32)
libx32ncursesw5 - shared libraries for terminal handling (wide character support) (x32)
libx32ncursesw5-dev - developer's libraries for ncursesw (x32)
libx32tinfo-dev - developer's library for the low-level terminfo library (x32)
libx32tinfo5 - shared low-level terminfo library for terminal handling (x32)
autoconf-dickey - automatic configure script builder (Thomas Dickey's version)
fizmo - Z-machine interpreter for Infocom/Inform games
fizmo-common - Provides localization data from all default fizmo-related
fizmo-ncursesw - Ncurses-based Z-machine interpreter for Infocom/Inform games
fp-units-base - Free Pascal - base units dependency package
fp-units-base-2.6.0 - Free Pascal - base units
iptraf-ng - Next Generation Interactive Colorful IP LAN Monitor
libcurses-ocaml - OCaml bindings for the ncurses library (runtime)
libghc-ncurses-dev - Haskell bindings to the GNU ncurses library
libghc-ncurses-doc - Haskell bindings to the GNU ncurses library; documentation
libghc-ncurses-prof - Haskell bindings to the GNU ncurses library; profiling libraries
petitboot - ncurses version of petitboot, a kexec based bootloader
rexima - simple ncurses/command-line mixer
ruby-ncurses - ruby extension for the ncurses C library
tack - terminfo action checker
tack-dbg - terminfo action checker (debug)
transmission-remote-cli - ncurses interface for the Transmission BitTorrent daemon
weechat-curses - Fast, light and extensible chat client - console client
worklog - Keep Track of Time worked on Projects
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ 

3.果然,最合适的,就是那人说的libncurses5-dev了,所以去安装:

crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ sudo apt-get install libncurses
libncurses5           libncursesada2        libncursesada-doc     libncurses-ruby1.8    libncursesw5
libncurses5-dbg       libncursesada2-dev    libncurses-gst        libncurses-ruby1.9    libncursesw5-dbg
libncurses5-dev       libncursesada-dbg     libncurses-ruby       libncurses-ruby1.9.1  libncursesw5-dev
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ sudo apt-get install libncurses5
libncurses5      libncurses5-dbg  libncurses5-dev  
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ sudo apt-get install libncurses5-dev 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libtinfo-dev
Suggested packages:
  ncurses-doc
The following NEW packages will be installed:
  libncurses5-dev libtinfo-dev
0 upgraded, 2 newly installed, 0 to remove and 202 not upgraded.
Need to get 306 kB of archives.
After this operation, 1,146 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrors.163.com/ubuntu/ raring/main libtinfo-dev i386 5.9-10ubuntu4 [93.1 kB]
Get:2 http://mirrors.163.com/ubuntu/ raring/main libncurses5-dev i386 5.9-10ubuntu4 [213 kB]
Fetched 306 kB in 7s (38.4 kB/s)     
Selecting previously unselected package libtinfo-dev:i386.
(Reading database ... 157501 files and directories currently installed.)
Unpacking libtinfo-dev:i386 (from .../libtinfo-dev_5.9-10ubuntu4_i386.deb) ...
Selecting previously unselected package libncurses5-dev.
Unpacking libncurses5-dev (from .../libncurses5-dev_5.9-10ubuntu4_i386.deb) ...
Setting up libtinfo-dev:i386 (5.9-10ubuntu4) ...
Setting up libncurses5-dev (5.9-10ubuntu4) ...
crifan@ubuntu:~/develop/crosstool-ng/crosstool-ng-1.18.0$ 

4.在继续配置,看看是否解决此问题,然后的确解决了。

 

【总结】

Ubuntu中./configure出现:

configure: error: could not find curses header, required for the kconfig frontends

时,解决办法是:

其所指的是ncurses这个库,对应的Ubuntu下的包是libncurses5-dev

所以去安装即可:

sudo apt-get install libncurses5-dev



发表评论

电子邮件地址不会被公开。 必填项已用*标注

无觅相关文章插件,快速提升流量