The solution to make Menuconfig is to prompt “Error opening terminal: xterm.
Under Linux environment, make menuconfig or make config commands are used when compiling embedded systems. These commands usually use the ncurses library. If the ncurses library is not installed and set correctly, the following Error message may appear:
Error opening terminal: xterm
Solutions:
1. First make sure that the ncurses library is installed correctly. On debian, Ubuntu, you can use dpkg-l | grep ncurses to see if the ncurses library is installed.
2. If ncurses is already installed, check to see if the TERM and TERMINFO environment variables have been set correctly. If it is not set correctly, you need to set it to the correct value.
$ echo $TERM
$ echo $TERMINFO
For TERMINFO, the path to TERMINFO should be set, such as /usr/share/ TERMINFO or /lib/ TERMINFO. To view Terminfo's storage location with the following instruction:
$whereis terminfo
terminfo: /etc/terminfo /lib/terminfo /usr/share/terminfo /usr/share/man/man5/terminfo.5.gz
See if the terminal information file is saved in the Terminfo directory: It is usually divided into A, B, C, D... Z these alphabetic directories, each containing term information beginning with that letter. For example, vT100 is placed in the "V" directory. The term we need must have the term information in the corresponding directory. Once you have identified this information, you can set the TERM and TERMINFO information:
export TERM=xterm
export TERMINFO=/lib/terminfo
The Settings above, must ensure that the/usr/share/terminfo term existing in the information, and/usr/share/terminfo/v/vt100 exists.
Regarding the setting of terms, it may need to be set to different terms such as Linux, VT100-putty, etc. Linux is commonly used for the Linux console, and vT100-putty is, as the name implies, a VT100 terminal that USES PuTTY to log in remotely.
The following are the values of the TERM and TERMINFO environment variables in the Ubuntu12.10 environment after the problem is resolved.
$ echo $TERM
xterm
$ echo $TERMINFO
/lib/terminfo/