skip to Main Content

I am trying to install the Age extension for PostgreSQL-13 by following the instructions in the README file. When I navigate to the extension directory
/Users/moiz/Apache_age/postgresql-13.0/age and run the command
sudo make USE_PGXS=1 PG_CONFIG=/Users/moiz/Apache_age/postgresql-13.0/src/bin/pg_config install,
I get the following error:

make: execvp:
/Users/moiz/Apache_age/postgresql-13.0/src/bin/pg_config: Permission
denied make: *** No rule to make target `install’. Stop.

I am not sure what is causing this error or how to resolve it. Can anyone provide guidance on what might be going wrong and how to fix it?

Thanks in advance for your help.

6

Answers


  1. You can use the following steps to resolve this issue:

    1. First of all you need to check your user permisions i.e whether you have the access to the PostgreSql files.

    2. Alternatively, you need to set your PG_CONFIG envirnoment variable and confirm that it is set to the correct path. For the setting you can use this command:

    export
    PG_CONFIG=/Users/moiz/Apache_age/postgresql-13.0/src/bin/pg_config

    1. After you have done all the above steps now you need to run the make command as follows:

    sudo make USE_PGXS=1
    PG_CONFIG=/Users/moiz/Apache_age/postgresql-13.0/src/bin/pg_config
    install

    Now it will compile and install the required AGE extension for PostgreSQL 13.

    Login or Signup to reply.
  2. I recreated this error on my system and it is because the path to pg_config is not correct. Try using correct path in the make install command as:

    sudo make USE_PGXS=1 PG_CONFIG=/Users/moiz/Apache_age/postgresql-13.0/bin/pg_config install
    
    Login or Signup to reply.
  3. created this error on my system and it is because the path to pg_config is not correct. Try using correct path in the make install command as:

    sudo make USE_PGXS=1 PG_CONFIG=/Users/moiz/Apache_age/postgresql-13.0/bin/pg_config install

    Login or Signup to reply.
  4. To fix the "Permission denied" error, you need to grant write/update permission to the directory where you’re trying to install the extension.

    Someone asked same question, you can refer to this.

    Login or Signup to reply.
  5. You could try to use a relative path such as

    sudo make USE_PGXS=1 PG_CONFIG=../src/bin/pg_config install
    

    If this doesn’t work then you may have to reconfigure and reinstall postgresql with the command

    ./configure --prefix=$(pwd) --enable-debug --enable-cassert
    

    And then run

    gmake ; gmake install;
    

    And finally try PG_CONFIG again this time set PG_CONFIG to

    sudo make USE_PGXS=1 PG_CONFIG=../bin/pg_config install
    
    Login or Signup to reply.
  6. You might have to use the correct path for your postgresql config file, you can search for the correct path by the following command:

    which pg_config
    

    This command should print the full path to the pg_config file. If there is no output, it may be that PostgreSQL is not installed correctly or not in your PATH.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search