skip to Main Content

I am working on lanchain and had to store data in vector DB. I was following this document to install pgvector on windows and i was setting the PGROOT env variable, but even after setting the env variable by multiple methods the CMD nmake /F Makefile.win install keep throwing the error
Makefile.win (28): fatal error U1050: PGROOT is not set Stop.

2

Answers


  1. Chosen as BEST ANSWER

    A workaround I did that worked for me.

    I located !ifndef PGROOT in the Makefile.win file in the PGVector folder that I cloned from the git (Link) to be installed and set the variable explicitly like for example: PGROOT = C:Program FilesPostgreSQL16 (my pg version was 16), before the !ifndef PGROOT line. This is a workaround if you are not able to set the env variable in Windows. I tried setting, [System.Environment]::SetEnvironmentVariable($envVariableName, $envVariableValue, [System.EnvironmentVariableTarget]::User) as well.


  2. i have similar problem too.
    I tried this from GIT documentation

    set "PGROOT=C:Program FilesPostgreSQL16"
    git clone --branch v0.5.1 https://github.com/pgvector/pgvector.git
    cd pgvector
    nmake /F Makefile.win
    nmake /F Makefile.win install
    

    GIT run and download pgvector files.
    But cmd return this error:

    ‘nmake’ is not recognized as an internal or external command
    I’m running cmd as admin

    Can you help me please? 🙂

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