Installing dependencies:
First, we are going to install age
For that make a new directory and a sub-directory:
mkdir age_installation
cd age_installation
mkdir pg
cd pg
Download some important libraries by using the below commands before starting the process of installation of Apache Age. Since we are specifically using Linux to install the apache age, we will be using the below commands.
Remember below commands might vary according to the operating systems.
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison
Now considering you have already installed postgreSQL on your machine. Follow below steps for installation of age.
AGE:
Downloading:
Download the age from the GitHub repository. i.e. clone it in the age_installation directory.
git clone https://github.com/apache/age.git
Installing:
Configure age with PostgreSQL.
cd age/
sudo make PG_CONFIG=/home/talhastinyasylum/Desktop/age_installation/pg/postgresql-11.18/bin/pg_config install
make PG_CONFIG=/home/talhastinyasylum/Desktop/age_installation/pg/postgresql-8/bin/pg_config installcheck
In the above commands, PG_CONFIG requires the path to the pg_config file. The second command will check whether the installation was successful or not.
At the end of the check command, you will receive a message saying all tests passed.

You can check the part 2 of this article testing of PostgreSQL and Apache-age here part 2.
References:
You can take help from following links they helped me in installing as well:
- https://github.com/git-guides/install-git
- https://age.apache.org/age-manual/master/intro/setup.html
- https://www.postgresql.org/docs/current/install-procedure.html