【imx6】Unable to find the ncurses libraries的解决办法

问题描述

在执行make menuconfig时,报错:
Unable to find the ncurses libraries…

解决方法

安装ncurses和ncursesw库

sudo apt-get insatll ncurses-dev
sudo apt-get insatll ncursesw-dev

注意:ncursesw库是ncurses的升级版本,支持中文,否则中文会显示乱码;
而且imx6交叉编译环境执行make menuconfig时,会用到这个库,如果不安装,需要将/opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/pkgconfig/目录下ncurses++w.pc和ncursesw.pc删除,否则还会报错

再次执行make menuconfig后,还是报错:
Unable to find the ncurses libraries…

修改pkgconfig

查看ubuntu中安装ncurses时的ncurses*.pc,在/usr/lib/x86_64-linux-gun/pkgconfig目录中ncurses.pc

  1 prefix=/usr
  2 exec_prefix=${prefix}
  3 libdir=/usr/lib/x86_64-linux-gnu
  4 includedir=${prefix}/include
  5 major_version=5
  6 version=5.9.20140118
  7 
  8 Name: ncurses
  9 Description: ncurses 5.9 library
 10 Version: ${version}
 11 URL: http://invisible-island.net/ncurses
 12 Requires.private: tinfo
 13 Libs: -L${libdir} -lncurses
 14 Libs.private:  
 15 Cflags: 

对比上述路径和版本号,修改imx6交叉编译环境配置目录中的ncurses*.pc
进入imx6的配置环境的目录

cd /opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/pkgconfig

查看imx6交叉编译环境中的ncurses*.pc

$ ls ncurses*
ncurses.pc  ncurses++.pc  ncurses++w.pc  ncursesw.pc

修改文件ncurses.pc ncurses++.pc ncurses++w.pc ncursesw.pc,将libdir路径和version版本号修改为上述/usr/lib/x86_64-linux-gun/pkgconfig中描述的。

或者直接删除pkgconfig目录下ncurses*文件,同样可以解决问题

猜你喜欢

转载自blog.csdn.net/u010168781/article/details/80223276