Cyberithub

How to Install Allegro 5 library on Ubuntu 20.04 LTS (Focal Fossa)

Advertisements

In this article, we will see the steps to install Allegro 5 library on Ubuntu 20.04 LTS (Focal Fossa). Allegro is a very famous cross-platform game development library used in designing and development of video games and multimedia applications. It can easily handle common low level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. The latest available library is Allegro 5 which can be easily installed in almost all the famous linux distributions. Here we will see the steps to install Allegro 5 library on Ubuntu 20.04 LTS based systems. More on official website.

 

Important Features

  • It is supported on Windows, Linux, Mac OSX, iPhone and Android.
  • It is user friendly with intuitive C API usable from C++ and many other languages
  • It was hardware accelerated bitmap and graphical primitive drawing support (via OpenGL or Direct3D).
  • It has audio recording support.
  • It provides font loading and drawing support.
  • It provides video playback feature.
  • It has abstractions over shaders and low-level polygon drawing support.

 

How to Install Allegro 5 library on Ubuntu 20.04 LTS (Focal Fossa)

How to Install Allegro 5 library on Ubuntu 20.04 LTS (Focal Fossa)

Also Read: How to Install lxterminal on Ubuntu 20.04 LTS (Focal Fossa)

Step 1: Prerequisites

a) You should have a running Ubuntu 20.04 LTS Server.

b) You should have sudo or root access to run privileged commands.

c) You should have apt or apt-get utility available in your Server.

 

Step 2: Update Your Server

Before going through the steps to install allegro 5 library, it is important to first download and install all the available updates and upgrade to the latest version by using sudo apt update && sudo apt upgrade command as shown below.

cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:5 https://download.sublimetext.com apt/stable/ InRelease
Get:6 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [59.9 kB]
Get:8 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,384 kB]
Get:9 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [94.1 kB]
Get:10 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [936 B]
Get:11 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [788 kB]
Get:12 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [274 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,026 kB]
Get:14 http://in.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [712 kB]
Get:15 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [408 kB]
Get:16 http://in.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]
Get:17 http://in.archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [8,004 B]
Get:18 http://in.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [30.5 kB]
.........................................................

 

Step 3: Install Allegro 5 library

In the next step, you can install Allegro 5 library package from default Ubuntu repo by using sudo apt install liballegro5-dev command as shown below. This will download and install the package along with all its dependencies.

cyberithub@ubuntu:~$ sudo apt install liballegro5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-goa-1.0 libfwupdplugin1 libllvm11 libxmlb1
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
autopoint build-essential debhelper dh-autoreconf dh-strip-nondeterminism dpkg-dev dwz fakeroot g++ g++-9 gettext gir1.2-gtk-2.0 gir1.2-harfbuzz-0.0
icu-devtools intltool-debian libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl liballegro-acodec5-dev liballegro-acodec5.2
liballegro-audio5-dev liballegro-audio5.2 liballegro-dialog5-dev liballegro-dialog5.2 liballegro-image5-dev liballegro-image5.2 liballegro-physfs5-dev
liballegro-physfs5.2 liballegro-ttf5-dev liballegro-ttf5.2 liballegro-video5-dev liballegro-video5.2 liballegro5.2 libarchive-cpio-perl
libarchive-zip-perl libatk1.0-dev libblkid-dev libcairo-script-interpreter2 libcairo2-dev libcroco3 libdatrie-dev libdebhelper-perl libdumb1 libdumb1-dev
libegl-dev libexpat1-dev libfakeroot libffi-dev libfile-stripnondeterminism-perl libflac-dev libfontconfig1-dev libfreetype-dev libfreetype6-dev
....................................................

 

Step 4: Verify Installation

After successful installation, you can check the installed files path by using dpkg -L liballegro5-dev command as shown below.

cyberithub@ubuntu:~$ dpkg -L liballegro5-dev
/.
/usr
/usr/include
/usr/include/allegro5
/usr/include/allegro5/alcompat.h
/usr/include/allegro5/allegro.h
/usr/include/allegro5/allegro5.h
/usr/include/allegro5/allegro_color.h
/usr/include/allegro5/allegro_direct3d.h
/usr/include/allegro5/allegro_font.h
/usr/include/allegro5/allegro_memfile.h
/usr/include/allegro5/allegro_opengl.h
/usr/include/allegro5/allegro_primitives.h
/usr/include/allegro5/allegro_x.h
/usr/include/allegro5/altime.h
/usr/include/allegro5/base.h
/usr/include/allegro5/bitmap.h
/usr/include/allegro5/bitmap_draw.h
/usr/include/allegro5/bitmap_io.h
/usr/include/allegro5/bitmap_lock.h
/usr/include/allegro5/blender.h
/usr/include/allegro5/clipboard.h
/usr/include/allegro5/color.h
/usr/include/allegro5/config.h
..........................................

Leave a Comment