设计师小金编译错误:iwinfo。h:没有这样的文件或目录。

时间:2023-02-07 09:39:09

I downloaded the luci trunk from git https://github.com/openwrt/luci.git and got the following error when i compile it on centOS.

我从git https://github.com/openwrt/luci.git下载了luci trunk,并在centOS上编译时得到了以下错误。

I already have iw package intalled but still got the error.

我已经有了iw包,但仍然有错误。

   Package iw-3.10-4.el7.x86_64 already installed and latest version

How can i fix this issue?

我该如何解决这个问题?

make[1]: Entering directory `/home/mullex/Dev/Projects/openwrt-luci/modules/admin-full'
rm -f src/*.o src/luci-bwc
gcc  -O2 --std=gnu99 -Wall -pedantic    -fPIC -c -o src/luci-bwc.o src/luci-bwc.c
src/luci-bwc.c:35:20: fatal error: iwinfo.h: No such file or directory
#include <iwinfo.h>
                ^
compilation terminated.
make[1]: *** [src/luci-bwc.o] Error 1
make[1]: Leaving directory `/home/mullex/Dev/Projects/openwrt-luci/modules/admin-full'
*** Compilation of modules/admin-full failed!
make: *** [gccbuild] Error 1

1 个解决方案

#1


3  

I experienced this same problem this morning, when running the LuCI Makefile on Ubuntu, in order to get LuCI up and running on my PC for development purposes without the need to be connected to a router. I solved it in the following way:

我今天早上在Ubuntu上运行LuCI Makefile时遇到了同样的问题,为了让LuCI在我的PC上运行,而不需要连接到路由器。我用下面的方法解决了这个问题:

At this web page...

在这个web页面…

http://luci.subsignal.org/trac/changeset/10377

http://luci.subsignal.org/trac/changeset/10377

... there is a description of lines that were added to two files to implement features requiring the iwinfo.h include file. I had already installed iw (by using the command "sudo apt-get install iw") but it seemed that this did not include iwinfo.h, which I understand is a file that you can only install on OpenWRT. Therefore, to solve the issue, I manually reverted the two files back to their original state by deleting the green lines and adding in the red lines. By green lines and red lines I mean those highlighted in the Diff output of the files given at the above web page. Hence, I ended up with two revised (rolled-back) versions of the following two files:

…在两个文件中添加了对行的描述,以实现需要iwinfo的特性。h包含文件。我已经安装了iw(通过使用命令“sudo apt-get安装iw”),但似乎这并不包括iwinfo。我所理解的是一个只能在OpenWRT上安装的文件。因此,为了解决这个问题,我手动将两个文件还原为原来的状态,删除了绿线并添加了红线。通过绿线和红线,我指的是那些在上面的web页面上给出的文件的Diff输出中突出显示的内容。因此,我最终得到了以下两个文件的修改(回滚)版本:

contrib/package/luci/Makefile and modules/admin-full/src/luci-bwc.c

contrib /包/设计师小金/ Makefile和模块/ admin-full / src / luci-bwc.c

I then ran the top-level LuCI Makefile again, using the following command while in the top-level directory:

然后,我再次运行*LuCI Makefile,在*目录中使用以下命令:

sudo make runuhttpd

sudo使runuhttpd

The Makefile completed without errors, and its final step was to start the web server at localhost:8080/luci/

Makefile在没有错误的情况下完成,它的最后一步是在本地主机上启动web服务器:8080/luci/。

At this point in the terminal window, the process waits (i.e. does not return to command prompt) because it is running the web server. In my web browser, at localhost:8080/luci/, I now successfully see the default index page. If I enter CTRL-C in the terminal window, to kill the process, the web server stops and the default index page is no longer viewable in the web browser.

此时在终端窗口中,进程等待(即不返回命令提示符),因为它正在运行web服务器。在我的web浏览器中,在localhost:8080/luci/中,我现在成功地看到了默认的索引页。如果我在终端窗口中输入CTRL-C,以杀死进程,web服务器停止,而默认的索引页在web浏览器中不再可见。

To run the web server again, in the terminal I enter the last command that was executed by the Makefile, which is:

要再次运行web服务器,在终端中输入由Makefile执行的最后一个命令,即:

[my-top-level-LUCI-installation-directory]/host/usr/sbin/uhttpd -p 8080 -h [my-top-level-LUCI-installation-directory]/host/www -f

[font - family:宋体;mso - ascii - font - family: tahoma; mso - fareast - font - family:宋体;

Hope this helps.

希望这个有帮助。

#1


3  

I experienced this same problem this morning, when running the LuCI Makefile on Ubuntu, in order to get LuCI up and running on my PC for development purposes without the need to be connected to a router. I solved it in the following way:

我今天早上在Ubuntu上运行LuCI Makefile时遇到了同样的问题,为了让LuCI在我的PC上运行,而不需要连接到路由器。我用下面的方法解决了这个问题:

At this web page...

在这个web页面…

http://luci.subsignal.org/trac/changeset/10377

http://luci.subsignal.org/trac/changeset/10377

... there is a description of lines that were added to two files to implement features requiring the iwinfo.h include file. I had already installed iw (by using the command "sudo apt-get install iw") but it seemed that this did not include iwinfo.h, which I understand is a file that you can only install on OpenWRT. Therefore, to solve the issue, I manually reverted the two files back to their original state by deleting the green lines and adding in the red lines. By green lines and red lines I mean those highlighted in the Diff output of the files given at the above web page. Hence, I ended up with two revised (rolled-back) versions of the following two files:

…在两个文件中添加了对行的描述,以实现需要iwinfo的特性。h包含文件。我已经安装了iw(通过使用命令“sudo apt-get安装iw”),但似乎这并不包括iwinfo。我所理解的是一个只能在OpenWRT上安装的文件。因此,为了解决这个问题,我手动将两个文件还原为原来的状态,删除了绿线并添加了红线。通过绿线和红线,我指的是那些在上面的web页面上给出的文件的Diff输出中突出显示的内容。因此,我最终得到了以下两个文件的修改(回滚)版本:

contrib/package/luci/Makefile and modules/admin-full/src/luci-bwc.c

contrib /包/设计师小金/ Makefile和模块/ admin-full / src / luci-bwc.c

I then ran the top-level LuCI Makefile again, using the following command while in the top-level directory:

然后,我再次运行*LuCI Makefile,在*目录中使用以下命令:

sudo make runuhttpd

sudo使runuhttpd

The Makefile completed without errors, and its final step was to start the web server at localhost:8080/luci/

Makefile在没有错误的情况下完成,它的最后一步是在本地主机上启动web服务器:8080/luci/。

At this point in the terminal window, the process waits (i.e. does not return to command prompt) because it is running the web server. In my web browser, at localhost:8080/luci/, I now successfully see the default index page. If I enter CTRL-C in the terminal window, to kill the process, the web server stops and the default index page is no longer viewable in the web browser.

此时在终端窗口中,进程等待(即不返回命令提示符),因为它正在运行web服务器。在我的web浏览器中,在localhost:8080/luci/中,我现在成功地看到了默认的索引页。如果我在终端窗口中输入CTRL-C,以杀死进程,web服务器停止,而默认的索引页在web浏览器中不再可见。

To run the web server again, in the terminal I enter the last command that was executed by the Makefile, which is:

要再次运行web服务器,在终端中输入由Makefile执行的最后一个命令,即:

[my-top-level-LUCI-installation-directory]/host/usr/sbin/uhttpd -p 8080 -h [my-top-level-LUCI-installation-directory]/host/www -f

[font - family:宋体;mso - ascii - font - family: tahoma; mso - fareast - font - family:宋体;

Hope this helps.

希望这个有帮助。