1

I have installed postgres-16-beta and I was assigned to a project to make possible to use AGE with PostgreSQL 16. I have configured postgres with:

./configure --prefix=$(pwd) --enable-cassert --enable-debug CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer"

After that the make install command is executed and it goes fine with it.

Then I type the following command to install AGE:

make PG_CONFIG=~/Documents/PostgreSQL/postgresql-16beta1/bin/pg_config install

But it throws this error:

/usr/bin/flex -b  -o'src/backend/parser/ag_scanner.c' src/backend/parser/ag_scanner.l
flex: could not create src/backend/parser/ag_scanner.c
make: *** [/home/user_name/Documents/PostgreSQL/postgresql-16beta1/lib/pgxs/src/makefiles/../../src/Makefile.global:770: src/backend/parser/ag_scanner.c] Error 1

Downloaded age from this repo. I'm using Fedora Linux 38.

Matheus Farias
  • 716
  • 1
  • 10

5 Answers5

3

Try executing the command as the root user, like this:

sudo make PG_CONFIG=~/Documents/PostgreSQL/postgresql-16beta1/bin/pg_config install

If this doesn't work, you can build the ag_scanner.c manually using this command in the src/backend/parser directory:

flex -o ag_scanner.c ag_scanner.l
Wendel
  • 763
  • 1
  • 12
0
make PG_CONFIG=~/Documents/PostgreSQL/postgresql-16beta1/bin/pg_config install

The command above should be run using superuser sudo. Most posts for installing AGE suggest that.

Tito
  • 289
  • 8
0
./configure --prefix=$(pwd) --enable-cassert --enable-debug CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer"

after this command try make command and check for bin folder in main dir.

ls


cd bin

then inside bin check for pg_config file init. then try pwd command to display the path to bin folder

then move to age dir and then use

sudo make PG_CONFIG=path/to/bin/pg_config install
0

I ran into the same error. Using sudo at the begining of the command to install AGE worked fine for me.

here is the final command.

sudo make PG_CONFIG=home/zeeshan/Desktop/pg16/pg/postgresql-16beta1/bin/pg_config install

Change it according to you path.

0

According to your screenshot you simply do not have superuser privilages. I installed the same version. You can use the command with sudo like this

sudo make PG_CONFIG=/home/hannanaamir/age_installation/pg/postgresql-16beta1/bin/pg_config install

and then to run the regression tests you can use

make PG_CONFIG=/home/hannanaamir/age_installation/pg/postgresql-16beta1/bin/pg_config installcheck

Support for AGE is underway so currently many of the regression tests will fail. At this moment AGE for pg16 has 19/24 failed test cases