0

I am quite new to Terminal use. While installing and activating a local PostgreSQL server on my MacBook Pro (OS 10.6.8) I definitely messed up my .bash_profile (probably by messing around with user / superuser and password settings).

Actually I got the server running by entering:

psql -U postgres -p 5432 -d postgres

But I didn't get the additional plug-ins (PostGIS and osm2pgsql) to function, probably due to the messed-up profile. After starting a Terminal session the following message is shown:

-bash: export: /Users/Jop/.bash_profile': not a valid identifier

And the content of the .bash_profile is:

export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH
export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH source
/Users/Jop/.bash_profile
alias psql=/usr/local/pgsql-9.2/bin/psql
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/bin:$PATH" source /Users/Jop/.bash_profile
alias psql=/usr/local/pgsql-9.2/bin/psql
export PATH="/usr/local/bin:$PATH" source /Users/Jop/.bash_profile
alias psql=/usr/local/opt/postgresql/bin/psql
alias psql=/usr/local/pgsql-9.2/bin/psql
export PATH="/usr/local/bin:$PATH"

Could anyone help me out? Many thanks in advance!

0

The newlines before the 'source' statements are missing, the 'source' statements should be on a new line.

Also, there are quite a number of duplicate and conflicting lines in your config (the psql aliases).

0

Seems messy. Should be something like this I believe. Try it. Can’t hurt it more.

export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH
export PATH="/usr/local/bin:$PATH"
alias psql=/usr/local/pgsql-9.2/bin/psql

Then again, unclear on the source lines.

  • Those source lines can't be right, it would try to include .bash_profile from .bash_profile, infinite loop :) – Teun Vink Nov 8 '13 at 20:13
  • Thank you for your quick replies. It's clear to me that the whole thing is messed up. Anyhow, as a rookie on commandline stuff, could you please, if possible, do a complete rewrite of the relevant lines? By the way: I guess I should change shells before editing the profile, right? Thanks. – jm60 Nov 8 '13 at 20:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .