【微知】如何安装iwconfig,如手动编译安装wireless-tools?(make; make install; vim /etc/ld.so.conf; ldconfig; iwconfig)

背景

iwconfig是用来配置wifi的工具,属于wireless-tools工具集
有些时候在linux上无法找到wireless-tools工具集,需要手动编译,本文记录编译方式,以及一些问题。

要点

  • WT工具的背景, WT是HP维护的工具,since1996年

The Linux Wireless Extension and the Wireless Tools are an Open Source project sponsored by Hewlett Packard (through my contribution) since 1996, and build with the contribution of many Linux users all over the world.
The Wireless Extension (WE) is a generic API allowing a driver to expose to the user space configuration and statistics specific to common Wireless LANs. The beauty of it is that a single set of tool can support all the variations of Wireless LANs, regardless of their type (as long as the driver support Wireless Extension). Another advantage is these parameters may be changed on the fly without restarting the driver (or Linux).
The Wireless Tools (WT) is a set of tools allowing to manipulate the Wireless Extensions. They use a textual interface and are rather crude, but aim to support the full Wireless Extension. There are many other tools you can use with Wireless Extensions, however Wireless Tools is the reference implementation.
-iwconfig manipulate the basic wireless parameters
-iwlist allow to initiate scanning and list frequencies, bit-rates, encryption keys…
-iwspy allow to get per node link quality
-iwpriv allow to manipulate the Wireless Extensions specific to a driver (private)
-ifrename allow to name interfaces based on various static criteria

下载编译安装方法

  • 下载
git clone https://github.com/HewlettPackard/wireless-tools.git 
  • 编译
cd wireless-tools/wireless_tools/
make
  • 安装
make install
  • 共享库处理
vim /etc/ld.so.conf 
#添加 /usr/local/lib/
ldconfig #配置生效
  • 查看信息
iwconfig --version

实操

  • 下载
    在这里插入图片描述
  • 编译
    在这里插入图片描述
  • 安装
    在这里插入图片描述

异常处理

报错 libiw.so.29: cannot open shared object file

[root@localhost wireless_tools]# iwconfig --version
iwconfig: error while loading shared libraries: libiw.so.29: cannot open shared object file: No such file or directory

该问题出现原因是自己编译后,共享库并未加入全局。WT的工具被make install到了该目录:/usr/local/lib/
在这里插入图片描述

加入方式:
将/usr/local/lib/ 加入 /etc/ld.so.conf文件,然后执行ldconfig生效
在这里插入图片描述

参考:
https://github.com/HewlettPackard/wireless-tools/tree/master
https://hewlettpackard.github.io/wireless-tools/Tools.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值