Score:-1

Error on Ubuntu 20.04 LTS && the system is unable to locate package pi-bluetooth

in flag

I am new in Ubuntu and I would like to install pi-bluetooth for my projects but I can't. I looked at several forums but without having the precise answer to my specific request. I use Ubuntu 20.04.2 LTS on Windows Subsystem for Linux (WSL). When I use the command sudo apt update && sudo apt upgrade, I get :

Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.raspberrypi.org/debian jessie InRelease
Err:4 http:/ focal InRelease
  Could not resolve 'dists'
Hit:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Fetched 101 kB in 1s (136 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Skipping acquire of configured file 'main/binary-amd64/Packages' as repository 'http://archive.raspberrypi.org/debian jessie InRelease' doesn't support architecture 'amd64'
N: Skipping acquire of configured file 'ui/binary-amd64/Packages' as repository 'http://archive.raspberrypi.org/debian jessie InRelease' doesn't support architecture 'amd64'
W: Failed to fetch http://dists/focal/InRelease  Could not resolve 'dists'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  bluetooth bluez bluez-obexd
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1151 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] `Y`
Get:1 http://security.ubuntu.com/ubuntu focal-security/main amd64 bluez amd64 5.53-0ubuntu3.2 [979 kB]
Get:2 http://security.ubuntu.com/ubuntu focal-security/universe amd64 bluetooth all 5.53-0ubuntu3.2 [3152 B]
Get:3 http://security.ubuntu.com/ubuntu focal-security/main amd64 bluez-obexd amd64 5.53-0ubuntu3.2 [169 kB]
Fetched 1151 kB in 0s (3005 kB/s)
(Reading database ... 32412 files and directories currently installed.)
Preparing to unpack .../bluez_5.53-0ubuntu3.2_amd64.deb ...
Unpacking bluez (5.53-0ubuntu3.2) over (5.53-0ubuntu3.1) ...
Preparing to unpack .../bluetooth_5.53-0ubuntu3.2_all.deb ...
Unpacking bluetooth (5.53-0ubuntu3.2) over (5.53-0ubuntu3.1) ...
Preparing to unpack .../bluez-obexd_5.53-0ubuntu3.2_amd64.deb ...
Unpacking bluez-obexd (5.53-0ubuntu3.2) over (5.53-0ubuntu3.1) ...
Setting up bluez-obexd (5.53-0ubuntu3.2) ...
Setting up bluez (5.53-0ubuntu3.2) ...
invoke-rc.d: could not determine current runlevel
 * Reloading system message bus config...                                                                               Failed to open connection to "system" message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
invoke-rc.d: initscript dbus, action "force-reload" failed.
invoke-rc.d: could not determine current runlevel
Setting up bluetooth (5.53-0ubuntu3.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.1) ...
Processing triggers for systemd (245.4-4ubuntu3.6) ...

And I use the command sudo apt install pi-bluetooth, I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pi-bluetooth

To resolve the package problem, I use this link but nothing worked for me.

Can someone help me please !?

GMSL1706 avatar
in flag
I also found the package at that link, and when I tried the next step (`sudo add-apt-repository universe multiverse`), I found : `'universe' distribution component is already enabled for all sources.` And `'multiverse' distribution component is already enabled for all sources.` ... It still does not and I don't know how to do... any help !
user535733 avatar
cn flag
What do you want to accomplish with the binary? Emulators don't usually include bluetooth (or bluetooth pass-through) anyway, so the software should simply crash. Since it's in Restricted, you likely cannot get access to the source code. This seems more and more like a possible [XY problem](https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) -- what problem are you trying to solve that includes the wrong-architecture package as your preferred solution?
GMSL1706 avatar
in flag
I want to do a project with a linux system, but before I need to install some tools `sudo apt install bluetooth pi-bluetooth bluez blueman bluez-utils`. As I don't have a linux system, I thought that using WSL could help and facilite my work.
user535733 avatar
cn flag
WSL is the wrong tool to emulate RPi hardware. You can emulate the RPi environment with QEMU, but not sure about the bluetooth chip. Either way, that's got nothing to do with Ubuntu anymore.
GMSL1706 avatar
in flag
Ok, I understand. Thanks you for your help
Score:0
cn flag

The pi-bluetooth package is in the Restricted pocket of the Ubuntu repositories.

  • "Restricted" means that it contains proprietary (not open source) software. Proprietary software is also referred to as "non-free" software.

However, it's available ONLY for arm64 and armhf architectures used for Raspberry Pis. Normal amd64 used in most desktop systems won't work; it's the wrong architecture.

  1. Add the Restricted pocket
  2. Since you just changed your sources, refresh your database of available packages
  3. Install the software

Here are the three steps, in order:

sudo add-apt-repository restricted
sudo apt update
sudo apt install pi-bluetooth
GMSL1706 avatar
in flag
it still does not work. for the first command, I get this: `'restricted' distribution component is already enabled for all sources.`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.