Home > Blockchain >  'chcp' is not recognized as an internal or external command, in psql
'chcp' is not recognized as an internal or external command, in psql

Time:08-26

I installed PostgreSQL and pgAdmin 4 on windows 10. Everything works in pgAdmin, but when i try to use psql i get this error:

enter image description here

After running 'help', i can not run any option such as ? or \q. If i do, i get this error:

'more' is not recognized as internal or external command, operable program or batch file.

I found the chcp file in my Windows\System32. I assume it is the path that this file should be in. Also, i added C:\Program Files\PostgreSQL\14\bin to my environmental variable and C:\Program Files\PostgreSQL\14\lib to my system variable in PTAH. I restarted the windows expecting it to work, but it does not. Any idea what i should do here?

Thanks

CodePudding user response:

I'll try to guess, you need to run chcp on the command line, and then run psql

chcp 1252
psql 

CodePudding user response:

I found the answer. I just copied the 'chcp', 'find' and 'more' files' from Windows/System32 and pasted them in C:\Users and now everything is working.

  • Related