skip to Main Content

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


  1. Chosen as BEST ANSWER

    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.


  2. You need to remove the /pg_config from your path.
    The correct command should be

    sudo make PG_CONFIG=/home/chidera/bitnine/postgresql-13.5/src/bin
    
    Login or Signup to reply.
  3. While running the ./configure query before postgreSQL installation, specify the base installation directory as pwd(present working directory). It will install your postgreSQL in your custom directory i.e., pwd since you probably have multiple instances of posgreSQL installed.

    ./configure --prefix=$(pwd) --enable-cassert --enable-debug CFLAGS="-glldb -ggdb -Og -g3 -fno-omit-frame-pointer"
    

    Repeat the next installation steps.

    Login or Signup to reply.
  4. 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:

    export PATH=/path/to/postgres/bin:$PATH
    export PGDATA=/path/to/postgres/bin/data
    
    Login or Signup to reply.
  5. 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

    ls /home/chidera/bitnine/postgresql-13.5/src/bin/pg_config
    

    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:

    sudo make USE_PGXS=1 PG_CONFIG=/home/chidera/bitnine/postgresql 13.5/src/bin/pg_config install
    

    Hope it helped!

    Login or Signup to reply.
  6. I also encountered this error while installing postgresql and I also use WSL Ubuntu.

    Firstly, I would advice remove all previous installations using

    make clean
    

    And then reconfigure postgresql using

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

    –prefix specifies where you want to install postgresql, and in this case it will be in the present working directory.

    And then reinstall postgresql

    gmake; gmake install;
    

    After the installation you should see the bin directory in the pwd, the pg_config file is in the bin directory not in the src/bin directory.

    And then you can try running PG_CONFIG again from your Age directory, this time try to use a relative path. Eg;

    sudo make PG_CONFIG=../postgresql-13.5/bin/pg_config install
    

    If postgresql and Age are in the same directory.
    I hope this helps.

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