Nginx modules build fail:field ‘pkt6’ has incomplete type

这篇具有很好参考价值的文章主要介绍了Nginx modules build fail:field ‘pkt6’ has incomplete type。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

前言

最近升级Nginx 1.24.0,编译第三方module出错:

/usr/src/nginx_modules/ngx_json_post_module/src/ngx_json_post_module.c
In file included from src/event/ngx_event.h:526,
                 from src/http/ngx_http_upstream.h:14,
                 from src/http/ngx_http.h:34,
                 from /usr/src/nginx_modules/ngx_json_post_module/src/ngx_json_post_module.c:11:
src/event/ngx_event_udp.h:38:27: error: field ‘pkt6’ has incomplete type
   38 |     struct in6_pktinfo    pkt6;
      |                           ^~~~

原因

从这个可以看出,

field ‘pkt6’ has incomplete type

是定义不匹配,查了一下资料:

https://trac.nginx.org/nginx/ticket/2312

同时,看了一下第三方module的源码,发现第三方module源码,不是以nginx规则开头的:

The following two #include statements must appear at the beginning of every nginx file:

#include <ngx_config.h>
#include <ngx_core.h>

Development guide

解决

所以修改文件include头顺序,

#include <ngx_config.h>
#include <ngx_core.h>
....

搞定文章来源地址https://www.toymoban.com/news/detail-780781.html

到了这里,关于Nginx modules build fail:field ‘pkt6’ has incomplete type的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Module build failed (from ./node_modules/css-loader/dist/cjs.js): CssSyntaxError

    记录配置 Webpack 时遇到的一个百思不得其解的报错: Module build failed (from ./node_modules/css-loader/dist/cjs.js): CssSyntaxError 在看到这个问题以后,我第一时间去 reset.css 中查看语法是否有误;结果是没有任何错误。 在确定 css 文件无误以后,我把配置规则中的 css-loader 配置移除,只保

    2024年02月07日
    浏览(37)
  • webpack报错:Module build failed (from ./node_modules/babel-loader/lib/index.js)

    webpack打包的时候报错,报错信息如下: ERROR in ./static/js/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js): TypeError: this.getOptions is not a function 报错原因 :使用了高版本的babel-loader,导致babel-loader和babel-core版本冲突,我降低之前babel-loader为9版本 解决办法 :降低babel

    2024年02月12日
    浏览(36)
  • vue项目报错:Module build failed (from ./node_modules/vue-loader/index.js)

    运行项目报错 Module build failed (from ./node_modules/vue-loader/index.js):TypeError: Cannot read properties of undefined (reading ‘vue’) 解决方法:提高vue-loader版本 参考===

    2024年02月17日
    浏览(36)
  • 解决 “Module build failed (from ./node_modules/babel-loader/lib/index.js)“ 错误的方法

    前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到网站,这篇文章男女通用,看懂了就去分享给你的码吧。 在前端项目开发中,如果使用了 Babel 来转译 ES6+ 语法,有时会遇到错误信息 “Module build failed (from ./node_modules/b

    2024年02月15日
    浏览(69)
  • Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js)

    Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js): Error: ENOENT: no such file or directory, # 原因 将static文件夹的css文件删除了 # 解决方案 新建一个项目,在static文件夹中,复制customicons.css和customi

    2024年02月16日
    浏览(52)
  • Vue3报错:Module build failed (from ./node_modules/vue-loader/dist/index.js):TypeError:

    Module build failed (from ./node_modules/vue-loader/dist/index.js):TypeError: Cannot read properties of null (reading \\\'content\\\') 翻译:模块构建失败(from ./node_modules/vue-loader/dist/index.js):TypeError:无法读取null属性(读取\\\'content\\\')  模组报错,多半因为重复声明组件报错,

    2024年02月09日
    浏览(39)
  • Module build failed (from ./node_modules/postcss-loader/dist/cjs.js): Error: PostCSS plugin autopref

    使用vue+uni-app开发微信小程序运行后报错 报错原因:autoprefixer版本过高 解决方案:降低autoprefixer版本 执行: npm i postcss-loader autoprefixer@8.0.0 然后再次运行即可成功

    2024年02月16日
    浏览(34)
  • 编译报错:has incomplete type 不完全的类型

    在编译Linux C应用程序时,gcc如果报这种错误:has incomplete type(不完全的类型),往往是由于出现与系统重复的头文件导致 示例: 报错如下: /usr/include/x86_64-linux-gnu/bits/stat.h:91:21: error: field ‘st_atim’ has incomplete type struct timespec st_atim; /* Time of last access. */ 原因: 出现这种情况

    2024年02月12日
    浏览(29)
  • Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.

    TypeError: Cannot read property \\\'props\\\' of undefined [Vue warn]: Failed to resolve async component: function (resolve) 遇到以上三种问题,在我的项目中都归结为一个:就是依赖的sass-loader没有,或者说是依赖的node-sass没有 所以解决办法就是 在package.json查看  {   \\\"devDependencies\\\": {     \\\"node-sass\\\": \\\"^9.0.0\\\",

    2024年02月09日
    浏览(47)
  • 解决HbuildX中开发uniapp+vant出现的报错:Module build failed (from ./node_modules/postcss-loader/src/index.js):

    首先目录大致一致。 接下来运行的时候会出现Module build failed (from ./node_modules/postcss-loader/src/index.js): 这样的报错。   如果和我的一样的话,那就是HbuildX的坑了。   接下来只需要打开wxconponents里面vant目录下的icon里面的index.vue文件,把鼠标光标点击到代码里面,按ctrl+k,Hbui

    2024年02月15日
    浏览(44)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包