Open MKesenheimer opened 1 year ago
How did you install python 3.10 in the latest kali Linux, which now uses python 3.11 by default?
Yeah that was a problem. I compiled python from source. I downloaded the official package, compiled that and installed it. Any chance bluing will work with python3.11 sometime?
The next version of bluing is planned to support python 3.11.
And if you compiled and installed python 3.10 from the source, you may have to deal with some so files, such as:
_dbus_bindings.cpython-3*-x86_64-linux-gnu.so
_dbus_glib_bindings.cpython-3*-x86_64-linux-gnu.so
Have you tried installing dbus-python
using apt
instead of pip
?
sudo apt install libglib2.0-dev gir1.2-gtk-3.0 \
python3-dbus python3-gi python3-gi-cairo
Yes, thank you. I tried, but pip
wanted to install the dbus-python
package nevertheless. In the end, I managed to install bluing
by building dbus-python
from source and requesting the pip
install command with the --no-dependencies
option:
sudo -H pip install --no-dependencies bluing PyGObject docopt btsm btatt bluepy configobj btl2cap pkginfo xpycommon halo pyserial bthci btgatt log_symbols colorama spinners six termcolor
I can now run bluing
. But this is obviously not a clean solution.
I am Debian user and I have found problems during the installation, but I have found a solution.
I have compiled and installed Python3.10, and got the dbus-python error after try pip3.10 install bluing. So, I downloaded dbus-python 1.3.2 from sources and installed bluing with pip.
wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz
tar -xvf Python-3.10.0.tgz
cd Python-3.10.0
./configure --enable-optimizations
make -j 4
sudo make altinstall
cd ..
tar -xvzf dbus-python-upstream-1.3.2.tar.gz
cd dbus-python-upstream-1.3.2
./configure
make
sudo make install
sudo python3.10 setup.py install
# for some reason, dbus-python does not perform the installation in site-packages well, so:
sudo cp -r dbus/ /usr/local/lib/python3.10/site-packages/
pip3.10 install bluing
# Extra: If you do not have glibc 2.34, you can compile glibc 2.34 and patch rfkill:
wget http://ftp.gnu.org/gnu/glibc/glibc-2.34.tar.xz
tar xf glibc-2.34.tar.xz
cd glibc-2.34
mkdir build
mkdir glibc-2.34-install
cd build
../configure --prefix=$HOME/Downloads/glibc-2.34/glibc-2.34-install
make -j
make install
cp /usr/sbin/rfkill /tmp/rfkill
cp /lib/x86_64-linux-gnu/libsmartcols.so.1.1.0 $HOME/Downloads/glibc-2.34/glibc-2.34-install/lib/
cd $HOME/Downloads/glibc-2.34/glibc-2.34-install/lib/
ln -s libsmartcols.so.1 libsmartcols.so.1.1.0
patchelf --set-interpreter $HOME/Downloads/glibc-2.34/glibc-2.34-install/lib/ld-linux-x86-64.so.2 --set-rpath $HOME/Downloads/glibc-2.34/glibc-2.34-install/lib/ rfkill
# If you want, replace this rfkill for the older
sudo cp /usr/sbin/rfkill /usr/sbin/rfkill_backup
sudo cp /tmp/rfkill /usr/sbin/
What fixed it for me was installing bluing with CFLAGS="-lm" pip install bluing
to pass the required libs to the C Compiler when dbus-python is installed
bluing relies on the dbus-python package. On kali linux I get an error, when the dbus-python package is being built:
Why is this happening?