Need to Install Software From Source on Ubuntu?
At Bobcares, we often do this for our customers as a part of our Server Management Services.
Today let’s see how our Expert Support Engineers get this done with ease.
How to Locate Software Dependencies for Installing Software From Source on Ubuntu?
For installing any software we need the software dependencies first. Let’s see how to get the required dependencies easily.
To locate the software dependencies. we will need to search for the software package in packages.ubuntu.com. Click the link and review the information there to get started.
Type in the package name in the keyword field, select the Ubuntu distribution, and then the Section from which the software can be located.
Next, click on Search to locate the results of the research.
We will be able to see the list of available dependencies matching the requirements we gave while searching.
Installing Software From Source on Ubuntu
We will be installing the git versioning software system, the steps to follow are given below:
1. Ensure that the packages are up to date:
# apt-get update -y
Next, we must have a compiler available. We can run the below command to install build-essential:
# apt-get install build-essential -y
2. Download Dependencies using the following command:
# apt install build-essential dh-autoreconf libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev -y
3.We can download the Source Package
To download the package with get:
# wget https://github.com/git/git/archive/v2.23.0.tar.gz
After that we can extract the archive and change the directory into the new git directory:
# tar -xvzf v2.23.0.tar.gz # cd git-2.23.0/
4: Install Git wit the following command:
# make configure # ./configure --prefix=/usr # make all # make install # git --version
[Need assistance? We can help you!]
Install Software From A .deb File
1. First we need to download the deb File
# wget http://mirrors.kernel.org/ubuntu/pool/universe/j/jq/jq_1.5+dfsg-2_amd64.deb
2. Then we need to install dependencies
# apt-get install libjq1 libc6 -y
3. Install the package
# dpkg -i jq_1.5+dfsg-2_amd64.deb # dpkg -i jq_1.5+dfsg-2_amd64.deb
Installing Software From A Personal Package Archive (PPA)
Personal Package Archive or PPA is a proprietary repository for developers to provide versions of their software packages in a specific storage medium.
It allows us to install packages that are not available in the official Ubuntu package repositories.
Here we will be installing flatpack itself and then use it to install Cowsay.
The Cowsay program creates an ASCII picture of a cow stating a specific message we add:
# cowsay hello there _____________ < hello there > ------------- ^__^ (oo)_______ (__) )/ ||----w | || ||
1. Setting up PPA Archive
# add-apt-repository ppa:alexlarsson/flatpak -y
# apt-get update -y</code
2. Install Flatpak
# apt-get install flatpak -y
Installing Software With Flatpak
Flatpak is used to install desktop Linux applications as it offers a command-line interface to install applications.
The steps to follow are given below:
1. First, we can run the following command to add the Flathub repository:
# flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
2. Then we can locate by using the following:
# flatpak search Cowsay
3. After that we can install it by running the below command.
# flatpak install Cowsay -y
We will get the following result.
Looking for matches… Required runtime for org.gnome.gitlab.Cowsay/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.34) found in remote flathub org.gnome.gitlab.Cowsay permissions: ipc network wayland x11 ID Arch Branch Remote Download 1.  org.gnome.Platform x86_64 3.34 flathub 207.8 MB / 318.4 MB 2. [ ] org.gnome.Platform.Locale x86_64 3.34 flathub < 322.7 MB (partial) 3. [ ] org.freedesktop.Platform.GL.default x86_64 19.08 flathub < 90.8 MB 4. [ ] org.freedesktop.Platform.openh264 x86_64 19.08 flathub < 593.4 kB 5. [ ] org.gnome.gitlab.Cowsay x86_64 stable flathub < 56.3 kB Installing 1/5… ███████████████▊ 79% 3.2 MB/s 00:17
[Need assistance? We can help you!]
In short, we saw how to install software from source on Ubuntu with some quick and easy steps which are followed by our Support Techs.