Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6855275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:44:13+00:00 2026-05-27T01:44:13+00:00

I use homebrew,write this order to terminal.app to install postgresql. `brew install postgresql` <pre>==>

  • 0

I use homebrew,write this order to terminal.app to install postgresql.

`brew install postgresql`
<pre>==> Installing postgresql dependency: ossp-uuid  
==> Downloading ftp://ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz  

curl: (7) couldn't connect to host  
Trying a mirror...  
==> Downloading http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz  
######################################################################## 100.0%  
==> ./configure --disable-debug --without-perl --without-php --without-pgsql --prefix=/usr/local/Cell  
==> make  
==> make install  
/usr/local/Cellar/ossp-uuid/1.6.2: 12 files, 332K, built in 62 seconds  
==> Installing postgresql  
==> Downloading http://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/v9.1.1/postgresql-9.1.1.t  
######################################################################## 100.0%  
==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.1 --enable-thread-safety --  
==> make install-world  
==> Caveats  
# Build Notes  

If builds of PostgreSQL 9 are failing and you have version 8.x installed,  
you may need to remove the previous version first. See:  
  https://github.com/mxcl/homebrew/issues/issue/2510  

To build plpython against a specific Python, set PYTHON prior to brewing:  
  PYTHON=/usr/local/bin/python  brew install postgresql  
See:  
  http://www.postgresql.org/docs/9.1/static/install-procedure.html  

# Create/Upgrade a Database  

If this is your first install, create a database with:  
  initdb /usr/local/var/postgres  

To migrate existing data from a previous major version (pre-9.1) of PostgreSQL, see:  
  http://www.postgresql.org/docs/9.1/static/upgrading.html  

# Start/Stop PostgreSQL  

If this is your first install, automatically load on login with:  
  mkdir -p ~/Library/LaunchAgents  
  cp /usr/local/Cellar/postgresql/9.1.1/org.postgresql.postgres.plist ~/Library/LaunchAgents/  
  launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist  

If this is an upgrade and you already have the org.postgresql.postgres.plist loaded:  
  launchctl unload -w ~/Library/LaunchAgents/org.postgresql.postgres.plist  
  cp /usr/local/Cellar/postgresql/9.1.1/org.postgresql.postgres.plist ~/Library/LaunchAgents/  
  launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist  

Or start manually with:  
  pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start  

And stop with:  
  pg_ctl -D /usr/local/var/postgres stop -s -m fast  

# Other  

Some machines may require provisioning of shared memory:  
  http://www.postgresql.org/docs/current/static/kernel-resources.html#SYSVIPC  

If you want to install the postgres gem, including ARCHFLAGS is recommended:  
    env ARCHFLAGS="-arch x86_64" gem install pg  

To install gems without sudo, see the Homebrew wiki.  
==> Summary  
/usr/local/Cellar/postgresql/9.1.1: 2739 files, 37M, built in 7.1 minutes  </pre>

This is my first install.
So, I write below.
‘$ initdb/usr/local/var/postgres’

but it’s error. why??

-bash: initdb/usr/local/var/postgres: No such file or directory

next, I write below. It’s also error.

`$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start`
<pre>sh: /usr/local/var/postgres/server.log: No such file or directory</pre>

I check it does finish to download.

`$ brew list`
<pre>
brew-gem    node        postgresql  readline
libyaml     ossp-uuid   rails       ruby
</pre>

I could see there is postgresql.

So, I don’t know how I install postgresql.
I’m a very begginer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:44:16+00:00Added an answer on May 27, 2026 at 1:44 am

    Add a space after initdb:

    $ initdb /usr/local/var/postgres
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use Homebrew as the package manager. I run this command: brew update But
I need to convert an app from sqlite to Postgresql in order to use
I have python3 installed via homebrew: brew install python3 --framework I have the vim
I'm trying to use the Homebrew install script: /usr/bin/ruby -e $(curl -fsSL https://raw.github.com/gist/323731) It
i am install w3m with brew on lion. when i use the origin formula
Imagine you homebrew a custom gui framework that doesn't use windows handles (compact framework,
I'm running git 1.7 on Mac OSX, installed via Homebrew. I'm trying to use
use this website a lot but first time posting. My program creates a number
How to use macports and homebrew package management systems together without having them interfere
This is driving me round the bend at the moment. As a homebrew exercise

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.