-1

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.

10 Answers10

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.

1

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
Zainab Saad
  • 728
  • 1
  • 2
  • 8
1

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

farrukh raja
  • 187
  • 4
1

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.

Huzaifa
  • 484
  • 4
  • 8
1

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
1

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.

0

You need to firstly check for the permissions, if read and write permissions are enabled and path of the file.

Prachi
  • 39
  • 3
0

In order to solve this permission issue, you can go the directory i.e. PG_CONFIG=/Users/moiz/Apache_age/postgresql-13.0/src/bin/ in your case and then you have to run two commands

  • ls -l to list information about directory and verify whether permission is given or not.
  • And then use chmod to give permission if they were not given before.

Secondly, you can check environment variables that this path should be added there.

adil shahid
  • 125
  • 4
0

Ran into a similar issue. I simply used which psql to find the location of my postgres installation and then used that for the value of PG_CONFIG. But I suppose this would rely on the PATH variable being properly set. Possibly which pg_config might be a better option.

Hassoo
  • 85
  • 11
0

From the error message, first solution that comes to mind is to confirm that the directory you are working in has the read and execute permission.

Peter
  • 43
  • 4