Sudo Error: initializing audit plugin sudoers_audit? (MacOS Postgres troubleshooting problems

I'm going through the Heroku "Getting Started with Python" flow. It's my first time doing so, and stuck on following this set of instructions.

When I enter

$ pip install -r requirements.txt 

I get the error:

-bash: pip: command not found 

What I'm trying to do is install postgresql because the site says

"Postgres must be properly installed in order for this step to work properly."

The error with Postgres is that whenever i try to do anything, for example:

$ psql 

or

$ psql -h localhost 

it returns this error:

psql: error: FATAL: role "myname" does not exist 

when I try to do

$ sudo -u postgres createuser myname 

i receive the error

sudo: unknown user: postgres sudo: error initializing audit plugin sudoers_audit 

...

to even get to this point, I had to manually update my private/etc/host file to put generic MacOS localhost information back into that document (since work stuff had me messing with things years ago, rip)... so I assume this issue is similar, but I am stumped since apparently even sudo commands are not allowing me to create a user role in order to continue the Postgres install / setup. I have reinstalled and deleted the postgreSQL apps and data, restarted my computer, cleared the DNS cache, but these haven't helped me become unblocked. Any ideas or help would be appreciated, thank you.

For context, I'm on MacOS Big Sur 11.4

1 Answer

I have resolved the 'pip' issue from the beginning of the question in order to move on through the Heroku python experience. As it turns out, pip install -r requirements.txt alone is no longer sufficient to trigger the declaration of dependencies. What did work is when I typed in pip3 install -r requirements.txt , and the entire postgres troubleshooting experience need not have held me back. However, the question may be relevant to others or for myself sooner or later, so will leave it up.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like