I am new at this building the app but I have been copying the commands and all seems to be going very well thus far until now. I am at the point to install PostgreSQL and I was able to do the following with out any issues :
sudo apt install -y postgresql
sudo systemctl start postgresql@14-main
Then I start to get into trouble.
rhanel@Ubuntu22:~$ sudo -u postgres bash
[sudo] password for rhanel:
postgres@Ubuntu22:/home/rhanel$ createuser -DRS gvm
createdb -O gvm gvmd
could not change directory to “/home/rhanel”: Permission denied
createuser: error: creation of new role failed: ERROR: role “gvm” already exists
could not change directory to “/home/rhanel”: Permission denied
createdb: error: database creation failed: ERROR: database “gvmd” already exists
postgres@Ubuntu22:/home/rhanel$
What Have I done wrong? Please help!