Score:0

Install Package on Previous Version of Ubuntu

us flag

I need to install a package (in this case it is dbus-broker) on Ubuntu 20.04 (focal). Unfortunately apt install dbus-broker does not do the trick because the package is currently only available for hirsute (21.04).

This seems like it is probably a common problem which makes me think there is likely a common solution too. Can someone shed some light on what that could be?

user535733 avatar
cn flag
What you are trying to do is called *backporting*. Sometimes it works, sometimes it does not work. Generally, if you find yourself needing to bolt newer software onto an older LTS release, it means that LTS release is not meeting your needs anymore. Consider using a newer release of Ubuntu instead that requires no haywiring.
Terrance avatar
id flag
If you have to install it into 20.04 the git install process for that isn't that difficult to do. As far as the required packages go, the `linux-api-headers` can be ignored if you already have the kernel headers installed. Also, it does require `libsystemd-dev` to install.
user16768564 avatar
us flag
@user535733 Thanks for the term! That's definitely helpful. I can't use a newer release because the base image I am building upon still uses the older release.
user16768564 avatar
us flag
@Terrance So if I understand correctly, what you are saying is building from source is my best bet?
Terrance avatar
id flag
Yeah, that's what I just did to see if it worked. It installed just fine into my 20.04 installation.
user16768564 avatar
us flag
@Terrance Awesome, thanks for taking the time to do that!
us flag
You can download the .deb file from packages.ubuntu.com and install it in the older version of Ubuntu (if all the dependencies are available).
Score:0
id flag

Unfortunately, for the https://packages.ubuntu.com/hirsute/dbus-broker the dependencies would all need to be upgraded as well for Ubuntu 20.04 LTS. So, it is best to install from the git source

From the git to install:

First install the prereqs:

More than likely you already have the linux-headers installed, so we are going to skip that. However, the libsystemd-dev will be requested during the build.

sudo apt install git ninja-build meson pkg-config python-docutils libsystemd-dev

Next, download the git source for dbus-broker and enter the newly created folder:

git clone https://github.com/bus1/dbus-broker
cd dbus-broker/

Create a build dir and enter it:

mkdir build
cd build/

Now, build and install the dbus-broker:

meson setup . ..
ninja
ninja test
ninja install

Hope this helps!

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.