0

I'm trying to install Age with PostgreSQL 11, but I'm facing a "Permission denied" error. When running the command bash-3.2$ sudo make PG_CONFIG=/Users/moiz/Apache_age/postgresql/src/bin/pg_config install, it gives the following error:

bash-3.2$make: execvp: /Users/moiz/Apache_age/postgresql/src/bin/pg_config: Permission denied
bash-3.2$make: *** No rule to make target `install'.  Stop.

I have already tried changing the permissions of the pg_config file using chmod +x /Users/moiz/Apache_age/postgresql/src/bin/pg_config and changing the ownership using sudo chown moiz /Users/moiz/Apache_age/postgresql/src/bin/pg_config, but the issue persists.

  • Duplicate of [Permission denied when running make command to install PostgreSQL extension](https://stackoverflow.com/questions/76007363/permission-denied-when-running-make-command-to-install-postgresql-extension) – DavidW May 16 '23 at 21:12
  • You already asked much the same question. Why ask it again? – DavidW May 16 '23 at 21:13

5 Answers5

1

I would suggest changing ownership for the entire postgres directory.

sudo chown moiz /Users/moiz/Apache_age/postgresql

Also make sure there is not already an existing directory with the same name prior to the new PostgreSQL installation, and also that you are not referencing the directory with a different version from the AGE version you are trying to install.

If all still persists, doing a fresh installation from scratch may be the solution.

Ken W.
  • 397
  • 1
  • 13
0

When you specify the path on chmod and chown don't include /pg_config like so:

chmod +x /Users/moiz/Apache_age/postgresql/src/bin
sudo chown moiz /Users/moiz/Apache_age/postgresql/src/bin
0

Generally, this error occurs if you are not in the same directory as the makefile. So make sure to change your directory to the same as the makefile.

If it still doesn't work, although you have tried to changing permissions using chmod +x, try setting full permissions to the file and see if it helps.

chmod 777 /Users/moiz/Apache_age/postgresql/src/bin/pg_config
Safi50
  • 379
  • 1
  • 7
0

I would say to try and check these steps:

  1. Check the permissions
  2. Check ownership and use this command to change the ownership,if it's not correctsudo chown moiz /Users/moiz/Apache_age/postgresql/src/bin/pg_config
  3. Path Verification: check that path to pg_config is correct. Check that the concerned file is present (/Users/moiz/Apache_age/postgresql/src/bin/pg_config in your case) and also check that it correct path for your PostgreSQL installation. If the path is incorrect, correct it in the installation command accordingly.

I hope these steps will help!!!

0

It's a permission error, I would suggest you to change the current directory to the location of the makefile:

cd /Users/moiz/Apache_age

Execute permission to the bin directory and adjust the ownership of the directory:

chmod +x /Users/moiz/Apache_age/postgresql/src/bin
sudo chown moiz /Users/moiz/Apache_age/postgresql/src/bin

Finally, retry the installation command:

sudo make PG_CONFIG=/Users/moiz/Apache_age/postgresql/src/bin/pg_config install
Marcos Silva
  • 115
  • 5