1.1 libnl-3.4.0
./configure --prefix=/home/fnie/wpa/out/libnl --disable-static
make
make check
make install
// to install the API documentation:
mkdir -vp /home/fnie/wpa/out/libnl/doc
tar -xf ../libnl-doc-3.4.0.tar.gz --strip-components=1 --no-same-owner -C /home/fnie/wpa/out/libnl/doc
1.2 libnl-1.1-stable
后面编译 wpa_supplicant-2.6 时报错,"can't find -lnl",所以编译 libnl-1.1-stable。
./configure --prefix=/home/fnie/wpa/out/libnl-1.1-stable
make
make check
make install
// to install the API documentation:
mkdir -vp /home/fnie/wpa/out/libnl/doc
tar -xf ../libnl-doc-3.4.0.tar.gz --strip-components=1 --no-same-owner -C /home/fnie/wpa/out/libnl/doc
openssl
./config shared --prefix=/home/fnie/wpa/out/ssl/prefix --openssldir=/home/fnie/wpa/out/ssl/configuration
make
make test
make installwpa_supplicant-2.6
cd ~/wpa/wpa_supplicant-2.6/wpa_supplicant
cp defconfig .config
修改配置文件 .config,在"#Uncomment following two linee and fix..."下增加如下语句,用来添加openssl和libnl的头文件和库文件目录,更新编译链接环境变量:
CFLAGS += -I/home/fnie/wpa/out/ssl/prefix/include
CFLAGS += -I/home/fnie/wpa/out/libnl/include
LIBS += -L/home/fnie/wpa/out/ssl/prefix/lib
LIBS += -L/home/fnie/wpa/out/libnl/lib
LIBS += -L/home/fnie/wpa/out/libnl-1.1-stable/lib
LIBS_p += -L/home/fnie/wpa/out/ssl/prefix/lib执行 make 进行编译,成功后生成三个目标文件 wpa_supplicant, wpa_cli, wpa_passphrase 。
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
文章题目:在ubuntu上编译wpa_supplicant-2.6-创新互联
网页地址:http://lswzjz.com/article/cochss.html