IHP 1.3 is out now!

psql: could not connect to server: No such file or directory

gyan
I was trying to complete the hello world tutorial (blog). After running `./start` file, the server starts and I can see all the pages. However, there is a message - ``` initdb: cannot be run as root Please log in (using, e.g., "su") as the (unprivileged) user that will own the server process. ``` When I run `initdb` from bash, I get ``` initdb: command not found ``` Any suggestions what I can do? Information about system: WSL (Ubuntu 20.04.2 LTS) Package: postgresql Version: 13+226.pgdg20.04+1 direnv: loading ~/workspace/haskell/blog/.envrc direnv: export ~PATH [("ihpVersion","0.10.0"),("os","linux (WSL)"),("arch","x86_64"),("projectId","4793200b2608144dad120ad783c7d6d955777a45fee6b7595856bd77039ef5840fb3aea4ecd59dae2063edadc860d93768c9628f9ce590bec09b16e10b41f6ff")] initdb: cannot be run as root Please log in (using, e.g., "su") as the (unprivileged) user that will own the server process. GHCi, version 8.10.3: https://www.haskell.org/ghc/ :? for help package flags have changed, resetting and loading new packages... Loaded GHCi configuration from .ghci
marc PRO

Hey gyan,

the IHP server should not be started with a root user as this causes lots of problems. Can you try to use a different user and then create a new project with the different user?

gyan

Okay, I'll try doing that. Let's see how that goes. Thanks!

gyan

I tried to use nix-env from new account, but it said command not found. So, I tried to install nix to the new user account, but got this error:

error: getting status of /root/.nix-defexpr/channels: Permission denied
/tmp/nix-binary-tarball-unpack.OsUH3E8hOh/unpack/nix-2.3.11-x86_64-linux/install: unable to install Nix into your default profile

What can I do now?

marc PRO

I think you don't need to reinstall nix, once you installed it as root it should automatically be available for the non-root users as well. So you only need to run ihp-new blog