傻瓜式编译适用于armv6版本的 archlinux的dnsmasq2.56

今天想在armv6版本的archlinux安装一个dnsmasq,ipkg是装上了dnsmasq2.70.1可是发现就是启动不起来,/etc/rc.d/dnsmasq start时发现报错

xxxxxx GBLIC_2.17 not found xxxxxxxxxxxxxxxxxxxxxxxxx

上网查了一下是GBLIC的版本太低了,不支持2.17版本。没办法只能硬着头皮编译dnsmasq了。

1.下了一个dnsmasq2.56版本,解压至任意目录。

cd 进入dnsmasq2.56目录,比如说我的就是/home/xxx/桌面/yboot/dnsmasq2.56

2.修改Makefile文件

vim Makefile

加入三行命令

TOOLCHAIN= arm-none-linux-gnueabi-
CC= $(TOOLCHAIN)gcc
LD= $(TOOLCHAIN)gcc

保存退出。

3.在当前目录/home/xxx/桌面/yboot/dnsmasq2.56执行如下命令

make clean
make install

看到下面那一串输出就说明成功一半了。

make[1]: 正在进入目录 `/home/dootqoounbantu/桌面/yboot/dnsmasq-2.56/src'
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c cache.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c rfc1035.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c util.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c option.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c forward.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c network.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c dnsmasq.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c dhcp.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c lease.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c rfc2131.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c netlink.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c dbus.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c bpf.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c helper.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c tftp.c
arm-none-linux-gnueabi-gcc -Wall -W -O2     -c log.c
arm-none-linux-gnueabi-gcc  -o dnsmasq cache.o rfc1035.o util.o option.o forward.o network.o dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o helper.o tftp.o log.o   
make[1]:正在离开目录 `/home/dootqoounbantu/桌面/yboot/dnsmasq-2.56/src'
install -d /opt/dnsmasq/sbin -d /opt/dnsmasq/share/man/man8
install -m 644 man/dnsmasq.8 /opt/dnsmasq/share/man/man8 
install -m 755 src/dnsmasq /opt/dnsmasq/sbin

4.编译完成后会在src 文件夹下生成一个 dnsmasq的可执行文件,我们要的就是那玩意了

额外的话*************************

生成的dnsmasq是可执行的,但是需要配置相应目录文件才可以正常使用这个软件,

1.dot.html里面是文件目录,这必须关注!

2.dnsmasq.conf是配置文件,配置完成拷贝到/etc/下就OK了。【配置过程还要细化研究】

5.测试

直接运行dnsmasq

ps -ef |grep dnsmasq

若有结果输出,则说明dnsmasq是可以正常工作了。


OK,搞定

转载于:https://my.oschina.net/newsanp/blog/227107

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值