openwrt 遍译php_openwrt sdk编译软件包笔记

本文记录了在openwrt 15.05.1版本上编译php_openwrt sdk过程中遇到的问题及解决过程。首先遇到缺少git的错误,通过安装git解决。然后在更新软件包索引时出现awk函数未定义的错误,通过安装gawk解决。最后发现15.05.1版本在32位系统上无法编译,需使用64位系统。
摘要由CSDN通过智能技术生成

前言:

这个周末在研究怎么在openwrt运行一个pppoe服务器。过程可谓曲折...

上次玩openwrt已经是12.09的版本,这次已经是15.05.1了,编译时又遇到新的错误提示。

所以做了下笔记 ,省得又忘记。

openwrt编译一个软件包。

下载sdk下来。解压到目录。

之后在目录下运行

./script/feed update #下载软件包的索引

./script/feed install rp-pppoe #把软件包的信息安装到sdk里。

make package/rp-pppoe/download V=s #下载软件包

make package/rp-pppoe/compile V=s #编译软件

-----------------------------------------------------------------------------------------------------

writer15@MARSX86:~/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64$ ./scripts/feeds update

Updating feed 'base' from 'https://git.openwrt.org/15.05/openwrt.git' ...

sh: 1: git: not found

failed.

writer15@MARSX86:~/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64$

原因:没有装git

解决办法:sudo apt-get install git

-----------------------------------------------------------------------------------------------------

writer15@MARSX86:~/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64$ ./scripts/feeds update

Updating feed 'base' from 'https://git.openwrt.org/15.05/openwrt.git' ...

Already up-to-date.

Create index file './feeds/base.index'

awk: include/scan.awk: line 21: function asort never defined

awk: include/scan.awk: line 21: function asort never defined

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/find: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/find: Syntax error: "(" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/sed: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/sed: Syntax error: ")" unexpected

awk: include/scan.awk: line 21: function asort never defined

awk: include/scan.awk: line 21: function asort never defined

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/find: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/find: Syntax error: "(" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/sed: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/sed: Syntax error: ")" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

Updating feed 'packages' from 'https://github.com/Entware/openwrt-packages' ...

Already up-to-date.

Create index file './feeds/packages.index'

awk: include/scan.awk: line 21: function asort never defined

awk: include/scan.awk: line 21: function asort never defined

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/find: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/find: Syntax error: "(" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/sed: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/sed: Syntax error: ")" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

awk: include/scan.awk: line 21: function asort never defined

awk: include/scan.awk: line 21: function asort never defined

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/find: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/find: Syntax error: "(" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/sed: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/sed: Syntax error: ")" unexpected

writer15@MARSX86:~/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64$

原因:没有安装gawk

解决办法:sudo apt-get install gawk

PS:其实openwrt的文档说得很明白,编译openwrt在不同的发行版中要安装什么软件才能顺利完成编译....因为这次是编译软件包,所以走了不少弯路。

-----------------------------------------------------------------------------------------------------

writer15@MARSX86:~/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64$ ./scripts/feeds update

Updating feed 'base' from 'https://git.openwrt.org/15.05/openwrt.git' ...

Already up-to-date.

Create index file './feeds/base.index'

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/find: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/find: Syntax error: "(" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/sed: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/sed: Syntax error: ")" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/find: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/find: Syntax error: "(" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/sed: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/sed: Syntax error: ")" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

Updating feed 'packages' from 'https://github.com/Entware/openwrt-packages' ...

Already up-to-date.

Create index file './feeds/packages.index'

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/sed: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/sed: Syntax error: ")" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/find: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/find: Syntax error: "(" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/find: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/find: Syntax error: "(" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/sed: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/sed: Syntax error: ")" unexpected

/home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/staging_dir/host/bin/xargs: 1: /home/writer15/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-

x86_64/staging_dir/host/bin/xargs: Syntax error: word unexpected (expecting ")")

writer15@MARSX86:~/OpenWrt-SDK-15.05.1-x86-generic_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64$

原因:我google后得知,原因是15.05.1这个版本不能在32位发行版上编译了,要编译就只能用64位的发行版...原文:https://forum.openwrt.org/viewtopic.php?id=52430,6楼是答案。

解决办法:我是安装xubuntu amd64的...

阅读(1688) | 评论(0) | 转发(0) |

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值