继上次安装失败后,又再次安装失败链接https://blog.csdn.net/weixin_46361294/article/details/128032204?spm=1001.2014.3001.5501
- 安装步骤:
安装依赖(参照官网--因在centos安装,所以部分包会没有,只要将有的包安装即可,没有的包忽略)
yum install build-essential git libwebsockets-dev pkg-config zlib1g-dev libnl-3-dev libnl-genl-3-dev libcap-dev libpcap-dev libnm-dev libdw-dev libsqlite3-dev libprotobuf-dev libprotobuf-c-dev protobuf-compiler protobuf-c-compiler libsensors4-dev libusb-1.0-0-dev python3 python3-setuptools python3-protobuf python3-requests python3-numpy python3-serial python3-usb python3-dev python3-websockets librtlsdr0 libubertooth-dev libbtbb-dev
yum install make automake gcc gcc-c++ kernel-devel git libwebsockets-devel pkg-config zlib-devel libnl3-devel libcap-devel libpcap-devel NetworkManager-libnm-devel libdwarf libdwarf-devel elfutils-devel libsqlite3x-devel protobuf-devel protobuf-c-devel protobuf-compiler protobuf-c-compiler lm_sensors-devel libusb-devel fftw-develgit 克隆源码
git clone https://www.kismetwireless.net/git/kismet.git
cd kismet
git pull
cd kismet
./configure
注意:在这一步会显示,需要安装支持c++14和c++17的编译器
安装高版本的编译器gcc9.3.1
参考文章见下方
版权声明:本文为CSDN博主「熊博主」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_36522099/article/details/108302711下载源
centos-release-scl源下载地址:https://cbs.centos.org/koji/buildinfo?buildID=24739
在上述链接中下载这个:centos-release-scl-2-3.el7.centos.noarch.rpm (info) (download)
wget https://cbs.centos.org/kojifiles/packages/centos-release-scl-rh/2/3.el7.centos/noarch/centos-release-scl-rh-2-3.el7.centos.noarch.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/scl-utils-build-20130529-19.el7.x86_64.rpm安装
rpm -ivh centos-release-scl-rh-2-3.el7.centos.noarch.rpm
rpm -ivh centos-release-scl-2-3.el7.centos.noarch.rpm
rpm -ivh scl-utils-build-20130529-19.el7.x86_64.rpm
yum list all | grep centos-sclo-rh查看scl源中gcc版本
yum list all | grep centos-sclo-rh | grep devtoolset-9-gcc
devtoolset-9-gcc.x86_64 9.3.1-2.el7 centos-sclo-rh
devtoolset-9-gcc-c++.x86_64 9.3.1-2.el7 centos-sclo-rh
devtoolset-9-gcc-gdb-plugin.x86_64 9.3.1-2.el7 centos-sclo-rh 安装gcc、gcc-c++、gdb
yum install devtoolset-9-gcc.x86_64 devtoolset-9-gcc-c++.x86_64 devtoolset-9-gcc-gdb-plugin.x86_64 -y查看下scl安装了的包列表
scl --list 创建一个scl包的bash会话环境,切换gcc版本
scl enable devtoolset-9 bash查看当前gcc版本
gcc -v退出scl的bash环境,gcc版本又会变回4.8.5
exit相关命令
scl -h 查看帮助
scl -l 列出安装好的scl包
scl enable scl包 命令 启用scl软件包
scl enable devtoolset-9 bash 创建一个scl包的bash会话环境
exit # 退出scl bash环境,恢复系统的bash环境在需要高版本gcc进行编译其他软件包时,可以使用命令
scl enable devtoolset-9 bash
切到到gcc高版本的bash环境,然后再进行编译。
安装完gcc高版本之后继续进行编译./configure报错:未安装libwebsockets解决:安装步骤
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets
mkdir build
cd build
yum install cmake
cmake ..
make
make install
vim /etc/profile
将以下内容加入环境变量中!!!一定要注意路径不能写错,要不然找不到libwebsocketsexport libwebsockets_CFLAGS=/usr/local/software/libwebsockets/build/include/export libwebsockets_LIBS=$libwebsockets_LIBS:/usr/local/software/libwebsockets/build/lib/报错:
No package '**' foundConsider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.Alternatively, you may set the environment variables libusb_CFLAGS
and libusb_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.解决:我的电脑里面只装了libusb,并没有装其进行编译的包,命令:yum install libusb* 之后报错解决
继续./configure
make -j 8
make -j 8 的时候有报错 make[1]: *** [kismet_cap_hak5_wifi_coconut] 错误 1
往前翻看./configure的报错,发现pkg的系统变量没有配置
同时有报错
Package libwebsockets was not found in the pkg-config search path.
Perhaps you should add the directory containing `libwebsockets.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libwebsockets' found
解决办法:
1.定位到缺失的包中
locate libwebsockets.pc
2.将缺失的包放在pkgconfig路径下
cp /usr/local/software/libwebsockets/build/libwebsockets.pc /usr/lib/pkgconfig
在 /etc/profile 中添加pkg路径 export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:$PKG_CONFIG_PATH
source /etc/profile
继续./configure
make -j 8
make suidinstall
使用 kismet 检测是否安装成功
本文链接:https://my.lmcjl.com/post/12812.html
展开阅读全文
4 评论