0

I am installing AGE software in my system (Ubuntu OS.In the step of configuration of AGE with PostgreSql, when enter this command I am getting an error. I’ve also reinstalled the software but I am getting same error every time. This is the link of blog which I am following https://theundersurfers.netlify.app/age-installation/

Command:

PG_CONFIG=/home/maimoona/age_installation/pg/postgresql-11.18/bin/pg_config install

Error:

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -ggdb -Og -fno-omit-frame-pointer -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/home/maimoona/age_installation/pg/postgresql-11.18/include/server -I/home/maimoona/age_installation/pg/postgresql-11.18/include/internal -D_GNU_SOURCE -c -o src/backend/catalog/ag_label.o src/backend/catalog/ag_label.c In file included from src/backend/catalog/ag_label.c:43: .//src/include/executor/cypher_utils.h:24:10: fatal error: access/table.h: No such file or directory 24 | #include "access/table.h" | ^~~~~~~~~~~~~~~~ compilation terminated. make: *** [: src/backend/catalog/ag_label.o] Error 1

I was expecting it to run properly and configure age with PostgreSQL. I also tried giving proper path from the recently installed PostgreSQL but same error message was occurred agai

Machavity
  • 30,841
  • 27
  • 92
  • 100

11 Answers11

3

Clone the AGE extension repository:

git clone https://github.com/agensgraph/agensgraph.git

Change to the AGE extension directory:

cd agensgraph

Build and install the extension:

./configure

make sudo make install

Create a new PostgreSQL data directory:

sudo mkdir /path/to/your/data/directory

sudo chown postgres:postgres /path/to/your/data/directory

Initialize the new PostgreSQL cluster with the AGTM option:

sudo -u postgres ag_ctl initdb -D /path/to/your/data/directory --agtm

Start the PostgreSQL server:

sudo -u postgres ag_ctl start -D /path/to/your/data/directory
Rayne
  • 61
  • 4
1

make is supposed to precede the command you typed.

It should be:

make PG_CONFIG=/home/maimoona/age_installation/pg/postgresql-11.18/bin/pg_config install

Visit AGE documentation.

Tito
  • 289
  • 8
1

Your command is incorrect. Add make before the statement and run the command

make PG_CONFIG=/home/maimoona/age_installation/pg/postgresql-11.18/bin/pg_config install

If the error still persists, check for compatibility of AGE and PostgreSQL.You can find more information on compatibility at the official AGE website.

1

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.

Image description

TylerH
  • 20,799
  • 66
  • 75
  • 101
Talha Munir
  • 121
  • 5
0

Make sure to install the compatible postgreSQL version that AGE master is currently on. As of now the Apache AGE master branch is using postgres version 13 and the article you are following installs version 11. Install the appropriate postgres version as per the release docs

In case you want to use AGE with a previous version then clone that specfic branch instead of master

Zainab Saad
  • 728
  • 1
  • 2
  • 8
0

Your command just to be preceded by make for it to be effective.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
0

These types of errors mostly come because of incompatible versions of Postgres and Apache age. Sometimes, it says no postgress.h or age.control.

Try a different branch of the Apache Age. To switch branches, you can use git checkout <branch name> before installation. Also, ensure that you use the correct address of the pg_config and not some other Postgres installation on the same device.

I am assuming you are using the correct command for installation and are putting make in the command because if you didn't, that would give the error install: missing file operand

abhishek2046
  • 312
  • 1
  • 11
0

Please ensure that you are installing an AGE compatible version of postgresql, if you are, then update your command to make PG_CONFIG=/home/maimoona/age_installation/pg/postgresql-11.18/bin/pg_config install

If that doesn’t work you could try using a relative path such as;

make PG_CONFIG=../postgresql-11.18/bin/pg_config install

Depending on the location of your postgres source code.

0

The error message indicates that the compiler was unable to locate the necessary header file "access/table.h" during the build process. This often occurs when there is a problem with the include path or when some essential parts are missing from the PostgreSQL installation.

I think the possible solution is you should try to clean and rebuild AGE from the start. First you should run this code to remove all executable files from your system:

    make clean

Then, again run the installation command:

    PG_CONFIG=/path/to/postgresql/bin/pg_config install

Be sure to change the path '/path/to/postgresql' with the original path to your postgreSQL installation.

Hope this is helpful.

Raja Rakshak
  • 168
  • 2
-1

The main issue seems to be missing the make before your command. The command should be

make PG_CONFIG=/home/maimoona/age_installation/pg/postgresql-11.18/bin/pg_config install

Then to check installation use

make PG_CONFIG=/home/maimoona/age_installation/pg/postgresql-11.18/bin/pg_config installcheck

For proper installation all test case should pass.

-1

You need to write make as well in the command at the start. If the error still exists then it may occur because the AGE software is unable to locate the necessary files. It can be resolved by:

  1. You need to install the version of PostgreSQL that is compatible with the AGE. PG 13 or PG 12 can work almost fine.
  2. You have to also make sure your current directory is the one where you AGE repository is cloned.