GVKun编程网logo

make menuconfig 失败,提示:fatal error curses.h No such file or directory(make menuconfig出错)

9

本篇文章给大家谈谈makemenuconfig失败,提示:fatalerrorcurses.hNosuchfileordirectory,以及makemenuconfig出错的知识点,同时本文还将给你

本篇文章给大家谈谈make menuconfig 失败,提示:fatal error curses.h No such file or directory,以及make menuconfig出错的知识点,同时本文还将给你拓展/usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory、cache.h:40:18: fatal error: zlib.h: No such file or directory、Centos 7.5源码编译安装zabbix4.0报fatal error: mysql.h: No such file or directory、Centos fatal error: Python.h: No such file or directory等相关知识,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

make menuconfig 失败,提示:fatal error curses.h No such file or directory(make menuconfig出错)

前段时间Ubuntu 18.04系统挂了,重装系统后,一直没有安装编译环境,记录下编译时遇到的一些问题。

1、问题描述

make menuconfig时报如下错误:

root@ubuntu:/home/run/code/linux-4.9.y# make ARCH=arm CROSS_COMPILE=aarch64-xx-linux-gcc menuconfig
  HOSTCC  scripts/kconfig/mconf.o
<command-line>:0:12: fatal error: curses.h: No such file or directory    ## 错误位置
compilation terminated.
scripts/Makefile.host:124: recipe for target ''scripts/kconfig/mconf.o'' failed
make[1]: *** [scripts/kconfig/mconf.o] Error 1
Makefile:546: recipe for target ''menuconfig'' failed
make: *** [menuconfig] Error 2

2、解决方法

安装软件包libncurses5-dev

root@ubuntu:/home/run/code/linux-4.9.y# apt-get install libncurses5-dev 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
...
Setting up libtinfo-dev:amd64 (6.1-1ubuntu1.18.04) ...
Setting up libncurses5-dev:amd64 (6.1-1ubuntu1.18.04) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
root@ubuntu: /home/run/code/linux-4.9.y# 

重新执行make menuconfig,可以成功进入配置页面,如下:

root@ubuntu:/home/run/code/linux-4.9.y# make ARCH=arm CROSS_COMPILE=aarch64-xx-linux-gcc menuconfig
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTLD  scripts/kconfig/mconf
scripts/kconfig/mconf  Kconfig
 .config - Linux/arm 4.9.37 Kernel Configuration

3、注意事项

在嵌入式系统中,执行make menuconfig时,需要指定处理器架构ARCH和交叉编译工具链CROSS_COMPILE

/usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory

/usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory

cc -DDEBUG -mtune=core2 -O2 \
-onvideo nvideo.c \
-I/usr/include/atk-1.0 \
-I/usr/include/cairo \
-I/usr/include/gdk-pixbuf-2.0 \
-I/usr/include/glib-2.0 \
-I/usr/include/gtk-3.0 \
-I/usr/include/pango-1.0 \
-I/usr/include/libxml2 \
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include \
-lpthread \
-lgtk-3 -lgobject-2.0 -lgthread-2.0 \
-lxml2
In file included from /usr/include/glib-2.0/glib/galloca.h:34:0,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/gtk-3.0/gdk/gdkconfig.h:13,
from /usr/include/gtk-3.0/gdk/gdk.h:32,
from /usr/include/gtk-3.0/gtk/gtk.h:32,
from nvideo.c:11:
/usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory
compilation terminated.
make: *** [edit] Error 1

因为之前已经安装了 gtk 开发包,所以理论上不应该出现找不到.h 文件的问题。最后发现问题出在 - I/usr/lib/x86_64-linux-gnu/glib-2.0/include 参数上。因为之前使用的 64 位,所以这个位置没有问题,但是现在我用的是 32 位系统,所以导致这个路径指错了,增加 - I/usr/lib/i386-linux-gnu/glib-2.0/include 即可。

实际使用应该使用 pkg-config 来配置这个路径的,但是我想手工去完成这个事情,所以导致了这个问题。还弄得满世界去找是不是少装了哪个开发包~~:)

cache.h:40:18: fatal error: zlib.h: No such file or directory

cache.h:40:18: fatal error: zlib.h: No such file or directory

 

1、问题安装git 过程中 make出现问题

cache.h:40:18: Fatal error: zlib.h: No such file or directory
 #include <zlib.h>

 

 

2、解决方法

[root@rhelpc1 git-2.9.5]# yum install zlib zlib-devel -y

 

3、测试make

[root@rhelpc1 git-2.9.5]# make

问题解决。

 

参考:https://blog.csdn.net/konga/article/details/41383543

 

Centos 7.5源码编译安装zabbix4.0报fatal error: mysql.h: No such file or directory

Centos 7.5源码编译安装zabbix4.0报fatal error: mysql.h: No such file or directory

系统环境:CentOS 7.5是最小化安装的

编译信息

编译选项:
root@Server01 zabbix-4.0.0]# ./configure --prefix=/usr/share/applications/zabbix --enable-server --enable-agent --with-mysql=/usr/bin/mysql_config_editor --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2=/usr/lib64/libxml2.so
编译结果:
Configuration:

  Detected OS:           linux-gnu
  Install path:          /usr/share/applications/zabbix
  Compilation arch:      linux

  Compiler:              cc
  Compiler flags:         -g -O2 

  Library-specific flags:
    database:                  
    Net-SNMP:               -I/usr/local/include -I/usr/lib64/perl5/CORE -I. -I/usr/include

  Enable server:         yes
  Server details:
    With database:         MySQL
    WEB Monitoring:        cURL
      SSL certificates:      /usr/share/applications/zabbix/share/zabbix/ssl/certs
      SSL keys:              /usr/share/applications/zabbix/share/zabbix/ssl/keys
    Native Jabber:         no
    SNMP:                  yes
    IPMI:                  no
    SSH:                   no
    TLS:                   no
    ODBC:                  no
    Linker flags:                    -L/usr/lib64         -rdynamic   
    Libraries:                    -lxml2    -lnetsnmp   -lz -lpthread -levent    -lcurl -lm -ldl  -lresolv -lpcre 
    Configuration file:    /usr/share/applications/zabbix/etc/zabbix_server.conf
    External scripts:      /usr/share/applications/zabbix/share/zabbix/externalscripts
    Alert scripts:         /usr/share/applications/zabbix/share/zabbix/alertscripts
    Modules:               /usr/share/applications/zabbix/lib/modules

  Enable proxy:          no

  Enable agent:          yes
  Agent details:
    TLS:                   no
    Linker flags:                -rdynamic   
    Libraries:              -lz -lpthread    -lcurl -lm -ldl  -lresolv -lpcre 
    Configuration file:    /usr/share/applications/zabbix/etc/zabbix_agentd.conf
    Modules:               /usr/share/applications/zabbix/lib/modules

  Enable Java gateway:   no

  LDAP support:          no
  IPv6 support:          yes

***********************************************************
*            Now run ''make install''                       *
*                                                         *
*            Thank you for using Zabbix!                  *
*              <http://www.zabbix.com>                    *
***********************************************************

make install 报错

。。。。。。。。。。。。。。。
Making install in zbxcommshigh
make[3]: Entering directory `/usr/local/src/zabbix-4.0.0/src/libs/zbxcommshigh''
make[4]: Entering directory `/usr/local/src/zabbix-4.0.0/src/libs/zbxcommshigh''
make[4]: Nothing to be done for `install-exec-am''.
make[4]: Nothing to be done for `install-data-am''.
make[4]: Leaving directory `/usr/local/src/zabbix-4.0.0/src/libs/zbxcommshigh''
make[3]: Leaving directory `/usr/local/src/zabbix-4.0.0/src/libs/zbxcommshigh''
Making install in zbxdb
make[3]: Entering directory `/usr/local/src/zabbix-4.0.0/src/libs/zbxdb''
cc -DHAVE_CONFIG_H -I. -I../../../include     -g -O2  -MT libzbxdb_a-db.o -MD -MP -MF .deps/libzbxdb_a-db.Tpo -c -o libzbxdb_a-db.o `test -f ''db.c'' || echo ''./''`db.c
db.c:27:20: fatal error: mysql.h: No such file or directory
 # include "mysql.h"
                    ^
compilation terminated.
make[3]: *** [libzbxdb_a-db.o] Error 1
make[3]: Leaving directory `/usr/local/src/zabbix-4.0.0/src/libs/zbxdb''
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/zabbix-4.0.0/src/libs''
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/zabbix-4.0.0/src''
make: *** [install-recursive] Error 1

解决办法:(针对我的环境)

[root@Server01 zabbix-4.0.0]# ./configure --prefix=/usr/share/applications/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
[root@Server01 zabbix-4.0.0]# echo $?
0
[root@Server01 zabbix-4.0.0]# make install
[root@Server01 zabbix-4.0.0]# echo $?
0

 

Centos fatal error: Python.h: No such file or directory

Centos fatal error: Python.h: No such file or directory

Fatal error: Python.h: No such file or directory

问题解决方法: python2 yum install python-devel

python3 yum install python34-devel

我们今天的关于make menuconfig 失败,提示:fatal error curses.h No such file or directorymake menuconfig出错的分享已经告一段落,感谢您的关注,如果您想了解更多关于/usr/include/glib-2.0/glib/gtypes.h:34:24: fatal error: glibconfig.h: No such file or directory、cache.h:40:18: fatal error: zlib.h: No such file or directory、Centos 7.5源码编译安装zabbix4.0报fatal error: mysql.h: No such file or directory、Centos fatal error: Python.h: No such file or directory的相关信息,请在本站查询。

本文标签: