zoukankan      html  css  js  c++  java
  • 树莓派4B安装libbluetooth-dev报错解决

    直接apt-get安装libbluetooth-dev时发生依赖错误:

    pi@raspberrypi:~ $ sudo apt-get install libbluetooth-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     libbluetooth-dev : Depends: libbluetooth3 (= 5.50-1.2~deb10u1) but 5.50-1.2~deb10u1+rpt1 is to be installed

    并且-f和-m都无法绕过这类依赖错误。

    实际上从名字猜测,因为5.50-1.2~deb10u1+rpt1和5.50-1.2~deb10u1看似非常接近,可能前者是专为raspberry发布的一个版本,因此我们考虑强行绕过依赖检查。

    树莓派上绕过dependency检查的一般套路是:

    apt-get下载deb包

    使用dpkg --force-depends-version忽略dependency错误。即:

    pi@raspberrypi:~ $ apt-get download libbluetooth-dev
    pi@raspberrypi:~ $ ll
    total 244
    drwxr-xr-x 2 pi   pi     4096 May 27 15:18 Bookshelf
    drwxr-xr-x 6 pi   pi     4096 Jun 13 20:37 code
    drwxr-xr-x 2 pi   pi     4096 Jun 13 20:19 Desktop
    drwxr-xr-x 2 pi   pi     4096 May 27 15:46 Documents
    drwxr-xr-x 2 pi   pi     4096 Jun 20 22:19 Downloads
    -rw-r--r-- 1 root root 190008 Mar 27 18:08 libbluetooth-dev_5.50-1.2~deb10u1_armhf.deb
    drwxr-xr-x 2 pi   pi     4096 May 27 15:46 Music
    drwxr-xr-x 2 pi   pi     4096 May 27 15:46 Pictures
    drwxr-xr-x 2 pi   pi     4096 May 27 15:46 Public
    drwxr-xr-x 2 pi   pi     4096 May 27 15:46 Templates
    drwxr-xr-x 2 pi   pi     4096 Jun 13 20:14 Videos
    pi@raspberrypi:~ $ sudo dpkg -i --force-depends-version ./libbluetooth-dev_5.50-1.2~deb10u1_armhf.deb
    (Reading database ... 158172 files and directories currently installed.)
    Preparing to unpack .../libbluetooth-dev_5.50-1.2~deb10u1_armhf.deb ...
    Unpacking libbluetooth-dev:armhf (5.50-1.2~deb10u1) over (5.50-1.2~deb10u1) ...
    dpkg: libbluetooth-dev:armhf: dependency problems, but configuring anyway as you requested:
     libbluetooth-dev:armhf depends on libbluetooth3 (= 5.50-1.2~deb10u1); however:
      Version of libbluetooth3:armhf on system is 5.50-1.2~deb10u1+rpt1.
    
    Setting up libbluetooth-dev:armhf (5.50-1.2~deb10u1) ...

    然后检查安装成功:

    pi@raspberrypi:~ $ dpkg -l|grep bluetoo
    ii  libbluetooth-dev:armhf                5.50-1.2~deb10u1                       armhf        Development files for using the BlueZ Linux Bluetooth library
    ii  libbluetooth3:armhf                   5.50-1.2~deb10u1+rpt1                  armhf        Library to use the BlueZ Linux Bluetooth stack
    ii  lxplug-bluetooth                      0.13                                   armhf        Bluetooth plugin for lxpanel
    ii  pi-bluetooth                          0.1.13                                 all          Raspberry Pi 3 bluetooth

    pi@raspberrypi:~ $ find /usr/ -name "bluetooth.h"
    /usr/include/bluetooth/bluetooth.h

  • 相关阅读:
    hdu1150&&POJ1325 Machine Schedule---最小点覆盖
    hdu-1068&&POJ1466 Girls and Boys---最大独立集
    hdu-2680 Choose the best route---dijkstra+反向存图或者建立超级源点
    hdu-1317 XYZZY---Floyd判连通+bellman最短路
    hdu-1874 畅通工程续---模板题
    hdu-2112 HDU Today---dijkstra+标号
    hdu-2066 一个人的旅行---模板题
    hdu-3790 最短路径问题---dijkstra两重权值
    hdu-2544 最短路---模板题
    BZOJ3529: [Sdoi2014]数表
  • 原文地址:https://www.cnblogs.com/shijianyujingshen/p/13196586.html
Copyright © 2011-2022 走看看