I installed postgres version 13 from source code using
wget https://ftp.postgresql.org/pub/source/v13.5/postgresql-13.5.tar.gz && tar -xvf postgresql-13.5.tar.gz && rm -f postgresql-13.5.tar.gz
./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-ggdb -Og -fno-omit-frame-pointer"
make install
It installed sucessfully and I tried installing AGE using git clone https://github.com/apache/age.git
Then I switched to the branch 1.3.0 using git switch release/PG13/1.3.0
from the AGE directory I set the PG_CONFIG environment variable to the pg_config path using sudo make PG_CONFIG=/home/chidera/bitnine/postgresql-13.5/src/bin/pg_config install
I keep getting this error make: pg_config: Not a directory make: *** No rule to make target 'installcheck'. Stop.
when I run this find / -name pg_config
command inside the directory where my postgresql was installed.
I get this as a response ./home/chidera/bitnine/postgresql-13.5/src/bin/pg_config
I am using WSL and ubuntu.
6
Answers
Installing postgres development files by using this command
sudo apt install postgresql-server-dev-all
before downloading the tar file as stated earlier by someone helped.You need to remove the
/pg_config
from your path.The correct command should be
While running the
./configure
query before postgreSQL installation, specify the base installation directory aspwd
(present working directory). It will install your postgreSQL in your custom directory i.e., pwd since you probably have multiple instances of posgreSQL installed.Repeat the next installation steps.
I replicated this error on Ubuntu 22.04 LTS by running the commands you provided in the question, and what worked was removing
src/
from the directory that is pointing to PG_CONFIG like this:sudo make PG_CONFIG=/home/chidera/bitnine/postgresql-13.5/bin/pg_config install
It is also good practice to set the following environment variables after installing PostgreSQL, replacing
/path/to/postgres
with your PostgreSQL installation directory:I think as mentioned above there’s a problem with the path youre providing currently for PF-CONFIG. So the first step is to check the path and its correctness, one way to do this is to run the following command
The result of this should be pg-config file. If it doesnt return, then you have the installation again.
However, if the issue still occurs then try to install AGE as follows:
Hope it helped!
I also encountered this error while installing postgresql and I also use WSL Ubuntu.
Firstly, I would advice remove all previous installations using
And then reconfigure postgresql using
–prefix specifies where you want to install postgresql, and in this case it will be in the present working directory.
And then reinstall postgresql
After the installation you should see the
bin
directory in the pwd, the pg_config file is in thebin
directory not in thesrc/bin
directory.And then you can try running PG_CONFIG again from your Age directory, this time try to use a relative path. Eg;
If postgresql and Age are in the same directory.
I hope this helps.