skip to Main Content

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.

3

Answers


  1. 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
    
    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
  3. ./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
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search