Alby
Alby

Reputation: 71

Makefile.win (28): fatal error U1050: PGROOT is not set Stop

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.

Upvotes: 0

Views: 545

Answers (1)

Alby
Alby

Reputation: 71

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 Files\PostgreSQL\16 (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.

Upvotes: 0

Related Questions