https://blog.csdn.net/zhengdong12345/article/details/130669711

make报错:fatal error:sys/sysctl.h:No such file or directory
执行make操作,报出fatal error:sys/sysctl.h:No such file or directory

问题处理
这个报错的主要原因是随着 glibc 2.32 的发布,Linux 系统删除了sys/sysctl.h。
Linux Kernel 5.5 最终消除了支持 sysctl 系统调用的代码,该代码已被弃用了大约十年,目前对任何架构的现代系统都没有影响。

查看系统版本:

可见Linux版本超过了5.5, 系统已经删除了 sys/sysctl.h
注释掉src/os/unix/ngx_linux_config.h中的 #include <sys/sysctl.h>

make 报错:error: this statement may fall through [-Werror=implicit-fallthrough=]
继续执行make操作,报出error: this statement may fall through [-Werror=implicit-fallthrough=]

问题处理
原因:表示打开gcc的所有警告 -Werror,它要求gcc将所有的警告当成错误进行处理
将 -Werror 直接去掉再重新make
其中:
-Wall 表示打开gcc的所有警告
-Werror,它要求gcc将所有的警告当成错误进行处理

打开:vim objs/Makefile 去掉-Werror即可

make报错:error: ‘struct crypt_data’ has no member named ‘current_salt’
继续执行make,报出error: ‘struct crypt_data’ has no member named ‘current_salt’

问题处理
原因:定义的crypt_data结构体中没有current_salt这个成员
处理:将有问题的那一行注释掉
进入到 src/os/unix/ngx_user.c中,注释掉第38行

Nginx make报错处理的更多相关文章

  1. Nginx启动报错:10013: An attempt was made to access a socket in a way forbidden

    Nginx在win7,win2008下启动报错:bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket i ...

  2. nginx默认80端口被System占用,造成nginx启动报错的解决方案

    今天启动window上的nginx总是报错 错误信息是bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socke ...

  3. FastDFS整合nginx后,nginx一直报错

    FastDFS整合nginx后,nginx一直报错: 报错内容: [2018-06-11 09:41:21] ERROR - file: ../common/fdfs_http_shared.c, l ...

  4. 重启虚拟机后,再次重启nginx会报错:[emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)

    问题: 重启虚拟机后,再次重启nginx会报错: open() "/var/run/nginx/nginx.pid" failed (2: No such file or dire ...

  5. nginx 启动报错 “/var/run/nginx/nginx.pid" failed” 解决方法

    问题: 重启虚拟机后,再次重启nginx会报错: open() "/var/run/nginx/nginx.pid" failed (2: No such file or dire ...

  6. Nginx 启动报错 “/var/run/nginx/nginx.pid" failed”

    问题: 重启虚拟机后,再次重启nginx会报错: open() "/var/run/nginx/nginx.pid" failed (2: No such file or dire ...

  7. Win7下nginx默认80端口被System占用,造成nginx启动报错的解决方案

    Win7下nginx默认80端口被System占用,造成nginx启动报错的解决方案   在win7 32位旗舰版下,启动1.0.8版本nginx,显示如下错误:  [plain] 2012/04/0 ...

  8. nginx 启动报错“var/run/nginx/nginx.pid" no such file or directory

    nginx 启动报错“var/run/nginx/nginx.pid" no such file or directory 今天刚搭建的nginx服务器启动时,报错“var/run/ngin ...

  9. nginx 启动报错403

    nginx 安装完成以后启动的时候报403, 网上找的答案是在配置文件nginx.conf里面加上 user root owner;这个要加在配置文件的第一行才行,否则还是会报错,配置文件截图为: 参 ...

  10. nginx启动报错:Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' fo

    一.背景 这个错误在重启nginx或者启动nginx的时候,经常会出现.我之前也一直认为出现这个错误是因为有程序占用了nginx的进程.但是知其然不知其所以然.每次报错都有点懵逼,所以这边一步步排查错 ...

随机推荐

  1. GLSL利用SDF进行矩形绘制公式推导

    简单记录一下关于SDF绘制矩形的公式推导,因为我们在iq的SDF代码中,给的直接是最后的推导结果,对它是怎么得来的,还是有点困惑. //这是利用sdf绘制矩形 float sdBox( in vec2 ...

  2. iOS通知使用小结

    最近在项目开发中遇到了一个问题,首页底部菜单和底部子菜单的互动.需求是这样的,编辑状态下点击红色删除按钮,首页底部菜单移除该项,子菜单中对应项选中状态设置为未选中,典型的一对多方式.刚开始的方案是想通 ...

  3. 10 Self-Attention(自注意力机制)

    博客配套视频链接: https://space.bilibili.com/383551518?spm_id_from=333.1007.0.0 b 站直接看 配套 github 链接:https:// ...

  4. KubeSphere 在互联网医疗行业的应用实践

    作者:宇轩辞白,运维研发工程师,目前专注于云原生.Kubernetes.容器.Linux.运维自动化等领域. 前言 2020 年我国互联网医疗企业迎来了"爆发元年",越来越多居民在 ...

  5. 轻量级网络-MobileNetv1 论文解读

    1.相关工作 标准卷积 分组卷积 从 Inception module 到 depthwise separable convolutions 2.MobileNets 结构 2.1,深度可分离卷积 D ...

  6. JS转义html编码

    两个方法: 1.利用用浏览器内部转换器实现html转义: 2.用正则表达式实现html转义: var HtmlUtil = { /*1.用浏览器内部转换器实现html编码(转义)*/ htmlEnco ...

  7. hbase的架构

    HBase中的存储包括HMaster.HRegionSever.HRegion.HLog.Store.MemStore.StoreFile.HFile等角色构成,具体如下HMaster的作用 1.为H ...

  8. 看图认识CSS

    教程: https://www.w3cschool.cn/css/ https://www.runoob.com/css/css-tutorial.html https://www.w3school. ...

  9. php如何解决高并发

    PHP交流群  656679284  为PHP广大爱好者提供技术交流,有问必答,相互学习相互进步! 1.应用和静态资源分离 将静态资源(js,css,图片等)放到专门的服务器中. 2.页面缓存 将应用 ...

  10. 【Playwright + Python】系列(九)Playwright 调用 Chrome 插件,小白也能事半功倍

    哈喽,大家好,我是六哥!今天我来给大家分享一下如何使用playwight调用chrome插件,面向对象为功能测试及零基础小白,我尽量用大白话的方式举例讲解,力求所有人都能看懂,建议大家先收藏,以免后面 ...