前言:
这个周末在研究怎么在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) |