Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I installed pgsql 9.0.10 on Ubuntu 12.10 from source (./configure, make, make install). It all went well, created /usr/local/pgsql/ and everything that it should contain, but I have encountered one issue, it has not created the aliases or whatever they might be.

Now, I do have every and each of the executables but I am lacking the "shortcuts" in the shell.

Edit: I tried adding symbolic links to /bin folder, but it didn't do the trick. Also, aliases won't work because of the variable that I have to input.

output of ls -l /usr/local/pgsql/bin

total 7468
-rwxr-xr-x 1 root root   57741 Apr  1 22:48 clusterdb
-rwxr-xr-x 1 root root   57702 Apr  1 22:48 createdb
-rwxr-xr-x 1 root root   61978 Apr  1 22:48 createlang
-rwxr-xr-x 1 root root   58056 Apr  1 22:48 createuser
-rwxr-xr-x 1 root root   53368 Apr  1 22:48 dropdb
-rwxr-xr-x 1 root root   62095 Apr  1 22:48 droplang
-rwxr-xr-x 1 root root   53370 Apr  1 22:48 dropuser
-rwxr-xr-x 1 root root  682769 Apr  1 22:48 ecpg
-rwxr-xr-x 1 root root   75352 Apr  1 22:48 initdb
-rw-r--r-- 1 root root      89 Apr  1 23:07 links.sh
-rwxr-xr-x 1 root root   29741 Apr  1 22:48 pg_config
-rwxr-xr-x 1 root root   29055 Apr  1 22:48 pg_controldata
-rwxr-xr-x 1 root root   39982 Apr  1 22:48 pg_ctl
-rwxr-xr-x 1 root root  298999 Apr  1 22:48 pg_dump
-rwxr-xr-x 1 root root   75237 Apr  1 22:48 pg_dumpall
-rwxr-xr-x 1 root root   33913 Apr  1 22:48 pg_resetxlog
-rwxr-xr-x 1 root root  134674 Apr  1 22:48 pg_restore
-rwxr-xr-x 1 root root 5298811 Apr  1 22:48 postgres
lrwxrwxrwx 1 root root       8 Apr  1 22:48 postmaster -> postgres
-rwxr-xr-x 1 root root  396164 Apr  1 22:48 psql
-rwxr-xr-x 1 root root   57773 Apr  1 22:48 reindexdb
-rwxr-xr-x 1 root root   35484 Apr  1 22:48 vacuumdb

that's what happens when I try to run pg_config

$ pg_config
The program 'pg_config' can be found in the following packages:
 * libpq-dev
 * postgresql-common
 * postgres-xc-server-dev
Try: sudo apt-get install <selected package>
share|improve this question
    
I don't fully understand what you mean by shell shortcuts. Is /usr/local/pgsql/bin actually in your PATH? How did you add the symbolic links? What's the output of ls -l /usr/local/pgsql/bin and file /usr/local/pgsql/bin/pg_config? –  tink Apr 1 '13 at 21:50
    
@tink I mean I can't type pg_config in the terminal because it won't run pg_config, instead it'll tell me to install certain packages. –  Ricard-Sole Apr 1 '13 at 22:18
    
Have you tried adding the install directory to your path? export PATH="${PATH}:/usr/local/pgsql/bin" –  tink Apr 1 '13 at 22:49
    
@tink thank you!! That did the trick, =) –  Ricard-Sole Apr 1 '13 at 22:52
    
Cool. Btw, why aren't you at least using 9.0.12 9f you HAVE to use such an old version of postgres? –  tink Apr 1 '13 at 23:25
show 2 more comments

1 Answer 1

up vote 0 down vote accepted

If that comment above was all it took :)

Edit your ~/.bashrc, and add that line to it (towards the bottom of the file) to make it permanent.

export PATH="${PATH}:/usr/local/pgsql/bin" 

Or, to make it available for all users on your system, create a file e.g.

/etc/profile.d/pg_local.sh

with the export statement as content.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.