My Yocto project version
我的Yocto项目版本
"3.1.15"
“3.1.15”
I do find nginx under the follow directory
我在下面的目录下找到了nginx
meta-openembedded/meta-webserver/recipes-httpd/nginx
├── files
│ ├── 0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch
│ ├── CVE-2021-23017.patch
│ ├── CVE-2021-3618.patch
│ ├── default_server.site
│ ├── nginx.conf
│ ├── nginx-cross.patch
│ ├── nginx-fix-pidfile.patch
│ ├── nginx.init
│ ├── nginx.service
│ ├── nginx-volatile.conf
│ └── proxy_params
├── nginx_1.16.1.bb
├── nginx_1.17.8.bb
└── nginx.inc
I have tried to add
我试着添加了
IMAGE_INSTALL += "nginx"
under build\conf\local.conf
but it shows error
在Build\conf\Local.conf下,但显示错误
ERROR: Nothing RPROVIDES 'nginx'
NOTE: Runtime target 'nginx' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['nginx']
ERROR: Required build target 'rity-demo-image' has no buildable providers.
Missing or unbuildable dependency chain was: ['rity-demo-image', 'nginx']
I have read one of the article
How to enable ngx_stream_core_module in Yocto
我读过一篇文章《如何在Yocto中启用NGX_STREAM_CORE_MODULE
It says that
上面写着
PD: It is a bad practice to modify the *.inc or the *.bb of a recipe from a third party layer, write a *.bbappend on your own layer instead.
Why?
and What should I do next if I want to correctly install nginx
为什么?如果我想正确安装nginx,下一步应该怎么做?
更多回答
1. Have you added meta-openembedded/meta-webserver
to your layers in bblayers.conf
? 2. Changing 3rd party layers is considered a bad practice, because when the 3rd party layer is updated it might delete (or conflict with) your edits. Having your changes in bbappend in your own layer gives a clear separation, and makes updates in general safer. Distributing your own changes gets easier in your own layer too.
1.您是否在bblayers.conf中将meta-Open Embedded/meta-Web服务器添加到您的层中?2.更改第三方层被认为是一种不好的做法,因为当更新第三方层时,可能会删除(或与)您的编辑冲突。将您在bbappend中的更改放在您自己的层中可以提供明确的分离,并使更新总体上更安全。在您自己的层中分发您自己的更改也变得更容易。
@skandigraun Thanks for the reply. You are correct! I forgot to check the bblayers.conf after adding into it now i can correctly install nginx(1.16.1) but now I have a new question. I would like to install a newer version of nginx (1.24.0) How am i going to accomplish that
@skandigraun感谢您的回复。你说得对!在添加bblayers.conf之后,我忘了检查它,现在我可以正确安装nginx(1.16.1),但现在我有一个新的问题。我想安装较新版本的nginx(1.24.0),我该如何完成
The easiest is to borrow the recipe from meta-oe, add it to your layer, and add PREFERRED_VERSION_nginx = "1.24.0"
to local.conf
to ensure the correct version if built.
最简单的方法是从meta-oe借用配方,将其添加到层中,并在local.conf中添加RISK_VERSION_nginx =“1.24.0”以确保构建时的版本正确。
@skandigraun Thanks for the help . After following your guide copy those file from meta-oe , I have successfully install nginx (1.24.0) and looks like it works well
@skandigraun感谢你的帮助。按照您的指南从META-OE复制这些文件后,我已经成功安装了nginx(1.24.0),看起来运行良好
I forgot to check the bblayers.conf after adding into it now i can correctly install nginx(1.16.1)
添加后忘记检查bblayers.conf,现在可以正确安装nginx(1.16.1)
${YOCTOROOT}/src/poky/../meta-openembedded/meta-webserver \
更多回答
我是一名优秀的程序员,十分优秀!