Thread

  1. pgsql setup

    Carsten Huettl <chuettl@ahorn-net.de> — 2000-07-12T22:45:16Z

    Hello,
    
    I am runing pgsql with suse linux v.6.4
    
    I have installed pgsql with rpm.
     When I start initdb as user postgres I get the following error:
    
    /usr/lib/pgsql/bin/initdb: pg_id: command not found
    Unable to determine a valid username.  If you are running
    initdb without an explicit username specified, then there
    may be a problem with finding the Postgres shared library
    and/or the pg_id utility.
    
    What can I do do fix this?
    
    TIA
    C.
    
    
    -- 
    Carsten Huettl - <http://www.ahorn-Net.de>
    pgp-key on request
    
    
  2. Re: pgsql setup

    Jacques Williams <jacques@jacqro.com> — 2000-07-13T12:37:31Z

    Carsten,
    
    Try adding these to your environment:
    
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/pgsql/lib
    PGLIB=/usr/lib/pgsql/lib
    
    initdb is having trouble finding the library files.
    
    HTH,
    
    Jacques Williams
    
    On Thu, Jul 13, 2000 at 12:45:16AM +0200, Carsten Huettl wrote:
    > Hello,
    > 
    > I am runing pgsql with suse linux v.6.4
    > 
    > I have installed pgsql with rpm.
    >  When I start initdb as user postgres I get the following error:
    > 
    > /usr/lib/pgsql/bin/initdb: pg_id: command not found
    > Unable to determine a valid username.  If you are running
    > initdb without an explicit username specified, then there
    > may be a problem with finding the Postgres shared library
    > and/or the pg_id utility.
    > 
    > What can I do do fix this?
    > 
    > TIA
    > C.
    > 
    > 
    > -- 
    > Carsten Huettl - <http://www.ahorn-Net.de>
    > pgp-key on request
    
    
  3. Re: pgsql setup

    Carsten Huettl <chuettl@ahorn-net.de> — 2000-08-02T09:08:27Z

    Hello Jacque,
    
    > Try adding these to your environment:
    > 
    > LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/pgsql/lib
    > PGLIB=/usr/lib/pgsql/lib
    > 
    > initdb is having trouble finding the library files.
    
    I am new to linux and pgsql too.
    How do I add this to my enviroment using bash?
    Simply:
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/pgsql/lib
    PGLIB=/usr/lib/pgsql/lib
    export  LD_LIBRARY_PATH
    export PGLIB
    ?
    
    echo $PG_LIBRARY_PATH
    is empty
    
    Do I have to do this as root or postgres?
    
    tia
    C.
    
    
    
    
    -- 
    Carsten Huettl - <http://www.ahorn-Net.de>
    pgp-key on request
    
    
  4. Re: pgsql setup

    ghaverla@freenet.edmonton.ab.ca — 2000-08-02T12:21:10Z

    On Wed, 2 Aug 2000, Carsten Huettl wrote:
    
    > > Try adding these to your environment:
    
    > > LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/pgsql/lib
    > > PGLIB=/usr/lib/pgsql/lib
    
    > > initdb is having trouble finding the library files.
    
    > I am new to linux and pgsql too.
    > How do I add this to my enviroment using bash?
    
    When you hit the enter key to submit one (or more, if you
    have multiple commands separated by semicolons on a single
    line), your "shell" (whether it is the original Bourne shell,
    the Korn shell, csh, bash, tcsh, ...) does a number of 
    special things.
    
    One of the first things it does is look to see if the user
    is submitting an environment variable definition for the 
    life of that single command.  I.e.:
      % FOO='bar' echo $FOO
      bar
      % 
    Here the shell parsed the environment definition setting
    the value of the variable FOO to equal 'bar', and then
    the shell ran the echo command with the argument of the
    contents (that is what the $ asks for) of the FOO variable.
    
    Once any leading environment variable definitions are
    handled, the shell then looks at the first word (or token)
    left on the line, to see if an alias substitution is
    to be made.  Quite often people will alias 'rm -i' for 'rm',
    to keep from accidentally deleting files they don't want.
    
    Once the above is handled, the shell looks for the first
    token on the line, and interprets that as the name of an 
    executable file.  It gets the contents of the PATH variable,
    and starts to go down the path, appending this first token
    on the command line to each path element, looking for the
    first match with a file name.  If no match is found, you
    might get a command not found message.  If a match is found,
    the file is examined to see if it is marked as executable.
    If the file is not executable, you will get a permission
    denied message.
    
    The action of variables like LD_LIBRARY_PATH happens once
    the program has started running.
     
    > Simply:
    > LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/pgsql/lib
    > PGLIB=/usr/lib/pgsql/lib
    > export  LD_LIBRARY_PATH
    > export PGLIB
    
    Okay, you set (appended to LD_LIBRARY_PATH and set PGLIB)
    2 variables, and marked them as variables which should be
    exported to any subshells which are generated (you need this
    if you are running shell scripts).
    
    > echo $PG_LIBRARY_PATH
    > is empty
    
    You never did set a PG_LIBRARY_PATH variable above, so it
    is not unusual to see it is empty.  This is probably a typo
    of some kind.
    
    > Do I have to do this as root or postgres?
    
    This has to be done (having these variables set) anytime the
    program in question (sorry, I missed the beginning of this thread)
    is run, by whoever is running the program.  With PostgreSQL, you
    probably don't want to be running things as root.  Where these
    variables are usually set, is in each individual users .login or
    RC file.  If any user on your site might want to do this, you
    would probably be best to edit the skeleton RC files for each user,
    so that you don't need to manually edit every new users RC files.
    
    Is this any clearer?
    
    Gord
    
    Matter Realisations     http://www.materialisations.com/
    Gordon Haverland, B.Sc. M.Eng. President
    101  9504 182 St. NW    Edmonton, AB, CA  T5T 3A7
    780/481-8019            ghaverla @ freenet.edmonton.ab.ca
    
    
    
    
  5. Re: pgsql setup

    Anthony E . Greene <agreene@pobox.com> — 2000-08-02T14:03:51Z

    On 02 Aug 2000 11:08 Carsten Huettl wrote:
    >How do I add this to my enviroment using bash?
    >Simply:
    >LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/pgsql/lib
    >PGLIB=/usr/lib/pgsql/lib
    >export  LD_LIBRARY_PATH
    >export PGLIB
    >?
    >
    >echo $PG_LIBRARY_PATH
    >is empty
    
    Try this:
    
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/pgsql/lib
    export PGLIB=/usr/lib/pgsql/lib
    
    
    
    -- 
    Anthony E. Greene <agreene@pobox.com> <http://www.pobox.com/~agreene/>
    PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
    Linux. The choice of a GNU Generation. <http://www.linux.org/>