I am struggling to install PostgreSQL on my macOS Big Sur with M1 chip. These are the message I get when I try to install PostgreSQL in the last step. I tried installing version 12, 11, 10. Anyone knows how to solve this problem?
psql -c "SELECT 1" -d {dbname} > /dev/null || postgres -D /usr/local/var/postgres >postgres. log 2>&1 & if you want to check and start postgres in one go (handy for automation scripts).
MacPorts. PostgreSQL packages are also available for macOS from the MacPorts Project. Please see the MacPorts documentation for information on how to install ports. A list of PostgreSQL packages can be found using the portfiles search tool on the MacPorts website.
There is a permissions issue produced by Big Sur sec policies. https://pgsnake.blogspot.com/2020/11/macos-big-sur-upgrade-breaking.html
This will happen if you're installing in the default location, which in this case is Library. I was struggling with this for a few days and found that if I define my own installation path not located in the Library folder(say some folder in my Desktop), I was able to install without issue.
Give that a try and see if it works for you.
Edit: Be sure to delete all previous failed installations if any exist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With