Thread: Problem of LD_LIBRARY_PATH
I installed pgsql 9.1 on Ubuntu server(10.10). Now I have a problem with the required env variable LD_LIBRARY_PATH. If I do not set this, I can not use some pg tools such as pg_dump, createuser...etc. If I set this variable, my term gets warning "unknown terminal type" for some linux commands such as top/vi so that I can not use them normally: postgres@backup:~$ top 'linux': unknown terminal type. Any suggestion?
2011/9/17 Rural Hunter <ruralhunter@gmail.com>: > I installed pgsql 9.1 on Ubuntu server(10.10). Now I have a problem with the > required env variable LD_LIBRARY_PATH. If I do not set this, I can not use > some pg tools such as pg_dump, createuser...etc. If I set this variable, my > term gets warning "unknown terminal type" for some linux commands such as > top/vi so that I can not use them normally: > postgres@backup:~$ top > 'linux': unknown terminal type. How exactly are you setting it?
This is my env: postgres@backup:~$ env MANPATH=:/opt/PostgreSQL/9.1/share/man SHELL=/bin/bash TERM=linux USER=postgres LD_LIBRARY_PATH=/opt/PostgreSQL/9.1/lib/ PGPORT=3500 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.x wd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: PGUSER=postgres PGDATABASE=postgres MAIL=/var/mail/postgres PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/PostgreSQL/9.1/bin PWD=/home/postgres LANG=zh_CN.UTF-8 SHLVL=1 HOME=/home/postgres LANGUAGE=zh_CN:zh LOGNAME=postgres PGDATA=/raid/PostgreSQL/data LESSOPEN=| /usr/bin/lesspipe %s LESSCLOSE=/usr/bin/lesspipe %s %s _=/usr/bin/env To make top/vi work, I just need to unset LD_LIBRARY_PATH. 于2011年9月18日 13:31:45,Scott Marlowe写到: > 2011/9/17 Rural Hunter<ruralhunter@gmail.com>: >> I installed pgsql 9.1 on Ubuntu server(10.10). Now I have a problem with the >> required env variable LD_LIBRARY_PATH. If I do not set this, I can not use >> some pg tools such as pg_dump, createuser...etc. If I set this variable, my >> term gets warning "unknown terminal type" for some linux commands such as >> top/vi so that I can not use them normally: >> postgres@backup:~$ top >> 'linux': unknown terminal type. > > How exactly are you setting it? >
Wow, you got me. On Sun, Sep 18, 2011 at 12:56 AM, Rural Hunter <ruralhunter@gmail.com> wrote: > This is my env: > postgres@backup:~$ env > MANPATH=:/opt/PostgreSQL/9.1/share/man > SHELL=/bin/bash > TERM=linux > USER=postgres > LD_LIBRARY_PATH=/opt/PostgreSQL/9.1/lib/ > PGPORT=3500 > LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.x > wd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: > PGUSER=postgres > PGDATABASE=postgres > MAIL=/var/mail/postgres > PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/PostgreSQL/9.1/bin > PWD=/home/postgres > LANG=zh_CN.UTF-8 > SHLVL=1 > HOME=/home/postgres > LANGUAGE=zh_CN:zh > LOGNAME=postgres > PGDATA=/raid/PostgreSQL/data > LESSOPEN=| /usr/bin/lesspipe %s > LESSCLOSE=/usr/bin/lesspipe %s %s > _=/usr/bin/env > > To make top/vi work, I just need to unset LD_LIBRARY_PATH. > > 于2011年9月18日 13:31:45,Scott Marlowe写到: >> >> 2011/9/17 Rural Hunter<ruralhunter@gmail.com>: >>> >>> I installed pgsql 9.1 on Ubuntu server(10.10). Now I have a problem with >>> the >>> required env variable LD_LIBRARY_PATH. If I do not set this, I can not >>> use >>> some pg tools such as pg_dump, createuser...etc. If I set this variable, >>> my >>> term gets warning "unknown terminal type" for some linux commands such as >>> top/vi so that I can not use them normally: >>> postgres@backup:~$ top >>> 'linux': unknown terminal type. >> >> How exactly are you setting it? >> > > > -- To understand recursion, one must first understand recursion.
Tried adding the path to ldconfig rather than redefining ld_library_path? On 18 Sep 2011, at 09:03, Scott Marlowe <scott.marlowe@gmail.com> wrote: > Wow, you got me. > > On Sun, Sep 18, 2011 at 12:56 AM, Rural Hunter <ruralhunter@gmail.com> wr= ote: >> This is my env: >> postgres@backup:~$ env >> MANPATH=3D:/opt/PostgreSQL/9.1/share/man >> SHELL=3D/bin/bash >> TERM=3Dlinux >> USER=3Dpostgres >> LD_LIBRARY_PATH=3D/opt/PostgreSQL/9.1/lib/ >> PGPORT=3D3500 >> LS_COLORS=3Drs=3D0:di=3D01;34:ln=3D01;36:mh=3D00:pi=3D40;33:so=3D01;35:d= o=3D01;35:bd=3D40;33;01:cd=3D40;33;01:or=3D40;31;01:su=3D37;41:sg=3D30;43:c= a=3D30;41:tw=3D30;42:ow=3D34;42:st=3D37;44:ex=3D01;32:*.tar=3D01;31:*.tgz= =3D01;31:*.arj=3D01;31:*.taz=3D01;31:*.lzh=3D01;31:*.lzma=3D01;31:*.tlz=3D0= 1;31:*.txz=3D01;31:*.zip=3D01;31:*.z=3D01;31:*.Z=3D01;31:*.dz=3D01;31:*.gz= =3D01;31:*.lz=3D01;31:*.xz=3D01;31:*.bz2=3D01;31:*.bz=3D01;31:*.tbz=3D01;31= :*.tbz2=3D01;31:*.tz=3D01;31:*.deb=3D01;31:*.rpm=3D01;31:*.jar=3D01;31:*.ra= r=3D01;31:*.ace=3D01;31:*.zoo=3D01;31:*.cpio=3D01;31:*.7z=3D01;31:*.rz=3D01= ;31:*.jpg=3D01;35:*.jpeg=3D01;35:*.gif=3D01;35:*.bmp=3D01;35:*.pbm=3D01;35:= *.pgm=3D01;35:*.ppm=3D01;35:*.tga=3D01;35:*.xbm=3D01;35:*.xpm=3D01;35:*.tif= =3D01;35:*.tiff=3D01;35:*.png=3D01;35:*.svg=3D01;35:*.svgz=3D01;35:*.mng=3D= 01;35:*.pcx=3D01;35:*.mov=3D01;35:*.mpg=3D01;35:*.mpeg=3D01;35:*.m2v=3D01;3= 5:*.mkv=3D01;35:*.ogm=3D01;35:*.mp4=3D01;35:*.m4v=3D01;35:*.mp4v=3D01;35:*.= vob=3D01;35:*.qt=3D01;35:*.nuv=3D01;35:*.wmv=3D01;35:*.asf=3D01;35:*.rm=3D0= 1;35:*.rmvb=3D01;35:*.flc=3D01;35:*.avi=3D01;35:*.fli=3D01;35:*.flv=3D01;35= :*.gl=3D01;35:*.dl=3D01;35:*.xcf=3D01;35:*.x >> wd=3D01;35:*.yuv=3D01;35:*.cgm=3D01;35:*.emf=3D01;35:*.axv=3D01;35:*.anx= =3D01;35:*.ogv=3D01;35:*.ogx=3D01;35:*.aac=3D00;36:*.au=3D00;36:*.flac=3D00= ;36:*.mid=3D00;36:*.midi=3D00;36:*.mka=3D00;36:*.mp3=3D00;36:*.mpc=3D00;36:= *.ogg=3D00;36:*.ra=3D00;36:*.wav=3D00;36:*.axa=3D00;36:*.oga=3D00;36:*.spx= =3D00;36:*.xspf=3D00;36: >> PGUSER=3Dpostgres >> PGDATABASE=3Dpostgres >> MAIL=3D/var/mail/postgres >> PATH=3D/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/Pos= tgreSQL/9.1/bin >> PWD=3D/home/postgres >> LANG=3Dzh_CN.UTF-8 >> SHLVL=3D1 >> HOME=3D/home/postgres >> LANGUAGE=3Dzh_CN:zh >> LOGNAME=3Dpostgres >> PGDATA=3D/raid/PostgreSQL/data >> LESSOPEN=3D| /usr/bin/lesspipe %s >> LESSCLOSE=3D/usr/bin/lesspipe %s %s >> _=3D/usr/bin/env >> >> To make top/vi work, I just need to unset LD_LIBRARY_PATH. >> >> =D3=DA2011=C4=EA9=D4=C218=C8=D5 13:31:45,Scott Marlowe=D0=B4=B5=BD: >>> >>> 2011/9/17 Rural Hunter<ruralhunter@gmail.com>: >>>> >>>> I installed pgsql 9.1 on Ubuntu server(10.10). Now I have a problem wi= th >>>> the >>>> required env variable LD_LIBRARY_PATH. If I do not set this, I can not >>>> use >>>> some pg tools such as pg_dump, createuser...etc. If I set this variabl= e, >>>> my >>>> term gets warning "unknown terminal type" for some linux commands such= as >>>> top/vi so that I can not use them normally: >>>> postgres@backup:~$ top >>>> 'linux': unknown terminal type. >>> >>> How exactly are you setting it? >>> >> >> >> > > > > -- > To understand recursion, one must first understand recursion. > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin
yes, tried that too and same thing happened. 于2011年9月18日 17:09:25,Richard Shaw写到: > Tried adding the path to ldconfig rather than redefining ld_library_path? > > On 18 Sep 2011, at 09:03, Scott Marlowe<scott.marlowe@gmail.com> wrote: > >> Wow, you got me. >> >> On Sun, Sep 18, 2011 at 12:56 AM, Rural Hunter<ruralhunter@gmail.com> wrote: >>> This is my env: >>> postgres@backup:~$ env >>> MANPATH=:/opt/PostgreSQL/9.1/share/man >>> SHELL=/bin/bash >>> TERM=linux >>> USER=postgres >>> LD_LIBRARY_PATH=/opt/PostgreSQL/9.1/lib/ >>> PGPORT=3500 >>> LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35 :*.x >>> wd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: >>> PGUSER=postgres >>> PGDATABASE=postgres >>> MAIL=/var/mail/postgres >>> PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/PostgreSQL/9.1/bin >>> PWD=/home/postgres >>> LANG=zh_CN.UTF-8 >>> SHLVL=1 >>> HOME=/home/postgres >>> LANGUAGE=zh_CN:zh >>> LOGNAME=postgres >>> PGDATA=/raid/PostgreSQL/data >>> LESSOPEN=| /usr/bin/lesspipe %s >>> LESSCLOSE=/usr/bin/lesspipe %s %s >>> _=/usr/bin/env >>> >>> To make top/vi work, I just need to unset LD_LIBRARY_PATH. >>> >>> 于2011年9月18日 13:31:45,Scott Marlowe写到: >>>> >>>> 2011/9/17 Rural Hunter<ruralhunter@gmail.com>: >>>>> >>>>> I installed pgsql 9.1 on Ubuntu server(10.10). Now I have a problem with >>>>> the >>>>> required env variable LD_LIBRARY_PATH. If I do not set this, I can not >>>>> use >>>>> some pg tools such as pg_dump, createuser...etc. If I set this variable, >>>>> my >>>>> term gets warning "unknown terminal type" for some linux commands such as >>>>> top/vi so that I can not use them normally: >>>>> postgres@backup:~$ top >>>>> 'linux': unknown terminal type. >>>> >>>> How exactly are you setting it? >>>> >>> >>> >>> >> >> >> >> -- >> To understand recursion, one must first understand recursion. >> >> -- >> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-admin >
On sön, 2011-09-18 at 14:56 +0800, Rural Hunter wrote: > This is my env: > postgres@backup:~$ env > MANPATH=:/opt/PostgreSQL/9.1/share/man > SHELL=/bin/bash > TERM=linux > USER=postgres > LD_LIBRARY_PATH=/opt/PostgreSQL/9.1/lib/ > PGPORT=3500 > LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*. x > wd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: > PGUSER=postgres > PGDATABASE=postgres > MAIL=/var/mail/postgres > PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/PostgreSQL/9.1/bin > PWD=/home/postgres > LANG=zh_CN.UTF-8 > SHLVL=1 > HOME=/home/postgres > LANGUAGE=zh_CN:zh > LOGNAME=postgres > PGDATA=/raid/PostgreSQL/data > LESSOPEN=| /usr/bin/lesspipe %s > LESSCLOSE=/usr/bin/lesspipe %s %s > _=/usr/bin/env > > To make top/vi work, I just need to unset LD_LIBRARY_PATH. What else do you have installed in /opt/PostgreSQL/9.1/lib/? Can you show a directory listing?
I didn't install anything else there: postgres@backup:~$ ls -l /opt/PostgreSQL/9.1/lib/ Total 9804 -rwxr-xr-- 1 root daemon 1366272 2011-09-09 13:45 libcrypto.so.6 -rw-r--r-- 1 root daemon 149938 2011-09-09 13:44 libecpg.a -rw-r--r-- 1 root daemon 18852 2011-09-09 13:44 libecpg_compat.a -rwxr-xr-x 1 root daemon 23327 2011-09-09 14:03 libecpg_compat.so -rwxr-xr-x 1 root daemon 23327 2011-09-09 14:03 libecpg_compat.so.3 -rwxr-xr-x 1 root daemon 23327 2011-09-09 14:03 libecpg_compat.so.3.3 -rwxr-xr-x 1 root daemon 87003 2011-09-09 14:03 libecpg.so -rwxr-xr-x 1 root daemon 87003 2011-09-09 14:03 libecpg.so.6 -rwxr-xr-x 1 root daemon 87003 2011-09-09 14:03 libecpg.so.6.3 -rwxr-xr-- 1 root daemon 192738 2011-09-09 13:45 libedit.so lrwxrwxrwx 1 root root 17 2011-09-13 13:47 libjpeg.so -> libjpeg.so.62.0.0 lrwxrwxrwx 1 root root 17 2011-09-13 13:47 libjpeg.so.62 -> libjpeg.so.62.0.0 -rwxr-xr-- 1 root daemon 138936 2011-09-09 13:45 libjpeg.so.62.0.0 -rwxr-xr-- 1 root daemon 59040 2011-09-09 13:45 liblber-2.3.so.0 -rwxr-xr-- 1 root daemon 241360 2011-09-09 13:45 libldap-2.3.so.0 -rwxr-xr-- 1 root daemon 260568 2011-09-09 13:45 libldap_r-2.3.so.0 lrwxrwxrwx 1 root root 15 2011-09-13 13:47 libncurses.so -> libncurses.so.5 lrwxrwxrwx 1 root root 17 2011-09-13 13:47 libncurses.so.5 -> libncurses.so.5.5 -rwxr-xr-- 1 root daemon 380336 2011-09-09 13:45 libncurses.so.5.5 -rw-r--r-- 1 root daemon 60292 2011-09-09 13:43 libpgport.a -rw-r--r-- 1 root daemon 101184 2011-09-09 13:44 libpgtypes.a -rwxr-xr-x 1 root daemon 68966 2011-09-09 14:03 libpgtypes.so -rwxr-xr-x 1 root daemon 68966 2011-09-09 14:03 libpgtypes.so.3 -rwxr-xr-x 1 root daemon 68966 2011-09-09 14:03 libpgtypes.so.3.2 lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libpng12.so -> libpng12.so.0.10.0 lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libpng12.so.0 -> libpng12.so.0.10.0 -rwxr-xr-- 1 root daemon 149520 2011-09-09 13:45 libpng12.so.0.10.0 -rw-r--r-- 1 root daemon 286182 2011-09-09 13:44 libpq.a -rwxr-xr-x 1 root daemon 189815 2011-09-09 14:03 libpq.so -rwxr-xr-x 1 root daemon 189815 2011-09-09 14:03 libpq.so.5 -rwxr-xr-x 1 root daemon 189815 2011-09-09 14:03 libpq.so.5.4 -rwxr-xr-- 1 root daemon 105464 2011-09-09 13:45 libsasl2.so.2 -rwxr-xr-- 1 root daemon 315032 2011-09-09 13:45 libssl.so.6 lrwxrwxrwx 1 root root 13 2011-09-13 13:47 libtermcap.so.2 -> libncurses.so lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libuuid.so -> libuuid.so.16.0.22 lrwxrwxrwx 1 root root 14 2011-09-13 13:47 libuuid.so.1 -> libuuid.so.1.2 -rwxr-xr-- 1 root daemon 17728 2011-09-09 13:45 libuuid.so.1.2 lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libuuid.so.16 -> libuuid.so.16.0.22 -rw-r--r-- 1 root daemon 51937 2011-09-09 13:45 libuuid.so.16.0.22 -rwxr-xr-- 1 root daemon 4157970 2011-09-09 13:45 libxml2.so.2 -rwxr-xr-- 1 root daemon 822303 2011-09-09 14:03 libxslt.so.1 drwxr-xr-x 4 root daemon 4096 2011-08-25 11:20 postgresql 于2011年9月18日 21:58:17,Peter Eisentraut写到: > On sön, 2011-09-18 at 14:56 +0800, Rural Hunter wrote: >> This is my env: >> postgres@backup:~$ env >> MANPATH=:/opt/PostgreSQL/9.1/share/man >> SHELL=/bin/bash >> TERM=linux >> USER=postgres >> LD_LIBRARY_PATH=/opt/PostgreSQL/9.1/lib/ >> PGPORT=3500 >> LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35: *.x >> wd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: >> PGUSER=postgres >> PGDATABASE=postgres >> MAIL=/var/mail/postgres >> PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/PostgreSQL/9.1/bin >> PWD=/home/postgres >> LANG=zh_CN.UTF-8 >> SHLVL=1 >> HOME=/home/postgres >> LANGUAGE=zh_CN:zh >> LOGNAME=postgres >> PGDATA=/raid/PostgreSQL/data >> LESSOPEN=| /usr/bin/lesspipe %s >> LESSCLOSE=/usr/bin/lesspipe %s %s >> _=/usr/bin/env >> >> To make top/vi work, I just need to unset LD_LIBRARY_PATH. > > What else do you have installed in /opt/PostgreSQL/9.1/lib/? Can you > show a directory listing? > > >
On sön, 2011-09-18 at 22:41 +0800, Rural Hunter wrote: > I didn't install anything else there: (for a very small value of "anything else") It looks like you have some version of libncurses in there, which is prone to interfere with the operating system installation. I suppose you got this installation from some third-party installer. So you might want to check their precise installation instructions, or report a bug if they don't work. I think setting LD_LIBRARY_PATH should not actually be necessary. Alternatively, install the official Ubuntu package. > postgres@backup:~$ ls -l /opt/PostgreSQL/9.1/lib/ > Total 9804 > -rwxr-xr-- 1 root daemon 1366272 2011-09-09 13:45 libcrypto.so.6 > -rw-r--r-- 1 root daemon 149938 2011-09-09 13:44 libecpg.a > -rw-r--r-- 1 root daemon 18852 2011-09-09 13:44 libecpg_compat.a > -rwxr-xr-x 1 root daemon 23327 2011-09-09 14:03 libecpg_compat.so > -rwxr-xr-x 1 root daemon 23327 2011-09-09 14:03 libecpg_compat.so.3 > -rwxr-xr-x 1 root daemon 23327 2011-09-09 14:03 libecpg_compat.so.3.3 > -rwxr-xr-x 1 root daemon 87003 2011-09-09 14:03 libecpg.so > -rwxr-xr-x 1 root daemon 87003 2011-09-09 14:03 libecpg.so.6 > -rwxr-xr-x 1 root daemon 87003 2011-09-09 14:03 libecpg.so.6.3 > -rwxr-xr-- 1 root daemon 192738 2011-09-09 13:45 libedit.so > lrwxrwxrwx 1 root root 17 2011-09-13 13:47 libjpeg.so -> > libjpeg.so.62.0.0 > lrwxrwxrwx 1 root root 17 2011-09-13 13:47 libjpeg.so.62 -> > libjpeg.so.62.0.0 > -rwxr-xr-- 1 root daemon 138936 2011-09-09 13:45 libjpeg.so.62.0.0 > -rwxr-xr-- 1 root daemon 59040 2011-09-09 13:45 liblber-2.3.so.0 > -rwxr-xr-- 1 root daemon 241360 2011-09-09 13:45 libldap-2.3.so.0 > -rwxr-xr-- 1 root daemon 260568 2011-09-09 13:45 libldap_r-2.3.so.0 > lrwxrwxrwx 1 root root 15 2011-09-13 13:47 libncurses.so -> > libncurses.so.5 > lrwxrwxrwx 1 root root 17 2011-09-13 13:47 libncurses.so.5 -> > libncurses.so.5.5 > -rwxr-xr-- 1 root daemon 380336 2011-09-09 13:45 libncurses.so.5.5 > -rw-r--r-- 1 root daemon 60292 2011-09-09 13:43 libpgport.a > -rw-r--r-- 1 root daemon 101184 2011-09-09 13:44 libpgtypes.a > -rwxr-xr-x 1 root daemon 68966 2011-09-09 14:03 libpgtypes.so > -rwxr-xr-x 1 root daemon 68966 2011-09-09 14:03 libpgtypes.so.3 > -rwxr-xr-x 1 root daemon 68966 2011-09-09 14:03 libpgtypes.so.3.2 > lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libpng12.so -> > libpng12.so.0.10.0 > lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libpng12.so.0 -> > libpng12.so.0.10.0 > -rwxr-xr-- 1 root daemon 149520 2011-09-09 13:45 libpng12.so.0.10.0 > -rw-r--r-- 1 root daemon 286182 2011-09-09 13:44 libpq.a > -rwxr-xr-x 1 root daemon 189815 2011-09-09 14:03 libpq.so > -rwxr-xr-x 1 root daemon 189815 2011-09-09 14:03 libpq.so.5 > -rwxr-xr-x 1 root daemon 189815 2011-09-09 14:03 libpq.so.5.4 > -rwxr-xr-- 1 root daemon 105464 2011-09-09 13:45 libsasl2.so.2 > -rwxr-xr-- 1 root daemon 315032 2011-09-09 13:45 libssl.so.6 > lrwxrwxrwx 1 root root 13 2011-09-13 13:47 libtermcap.so.2 -> > libncurses.so > lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libuuid.so -> > libuuid.so.16.0.22 > lrwxrwxrwx 1 root root 14 2011-09-13 13:47 libuuid.so.1 -> > libuuid.so.1.2 > -rwxr-xr-- 1 root daemon 17728 2011-09-09 13:45 libuuid.so.1.2 > lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libuuid.so.16 -> > libuuid.so.16.0.22 > -rw-r--r-- 1 root daemon 51937 2011-09-09 13:45 libuuid.so.16.0.22 > -rwxr-xr-- 1 root daemon 4157970 2011-09-09 13:45 libxml2.so.2 > -rwxr-xr-- 1 root daemon 822303 2011-09-09 14:03 libxslt.so.1 > drwxr-xr-x 4 root daemon 4096 2011-08-25 11:20 postgresql > > 于2011年9月18日 21:58:17,Peter Eisentraut写到: > > On sön, 2011-09-18 at 14:56 +0800, Rural Hunter wrote: > >> This is my env: > >> postgres@backup:~$ env > >> MANPATH=:/opt/PostgreSQL/9.1/share/man > >> SHELL=/bin/bash > >> TERM=linux > >> USER=postgres > >> LD_LIBRARY_PATH=/opt/PostgreSQL/9.1/lib/ > >> PGPORT=3500 > >> LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35 : > *.x > >> wd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: > >> PGUSER=postgres > >> PGDATABASE=postgres > >> MAIL=/var/mail/postgres > >> PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/PostgreSQL/9.1/bin > >> PWD=/home/postgres > >> LANG=zh_CN.UTF-8 > >> SHLVL=1 > >> HOME=/home/postgres > >> LANGUAGE=zh_CN:zh > >> LOGNAME=postgres > >> PGDATA=/raid/PostgreSQL/data > >> LESSOPEN=| /usr/bin/lesspipe %s > >> LESSCLOSE=/usr/bin/lesspipe %s %s > >> _=/usr/bin/env > >> > >> To make top/vi work, I just need to unset LD_LIBRARY_PATH. > > > > What else do you have installed in /opt/PostgreSQL/9.1/lib/? Can you > > show a directory listing? > > > > > > > > >
On Sun, Sep 18, 2011 at 10:47:39AM +0800, Rural Hunter wrote: > Any suggestion? I don't do ubuntu this week, so I may be out to lunch, but why don't you append to the system set value of the var. In RH (this week) we do this in /etc/profile.d/localpath.sh but shirley ubuntu has some means for doing this: export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ORACLE_HOME/lib"
Tried adding the path to ldconfig rather than redefining ld_library_path? On 18 Sep 2011, at 09:03, Scott Marlowe <scott.marlowe@gmail.com> wrote: > Wow, you got me. > > On Sun, Sep 18, 2011 at 12:56 AM, Rural Hunter <ruralhunter@gmail.com> wrote: >> This is my env: >> postgres@backup:~$ env >> MANPATH=:/opt/PostgreSQL/9.1/share/man >> SHELL=/bin/bash >> TERM=linux >> USER=postgres >> LD_LIBRARY_PATH=/opt/PostgreSQL/9.1/lib/ >> PGPORT=3500 >> LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.x >> wd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: >> PGUSER=postgres >> PGDATABASE=postgres >> MAIL=/var/mail/postgres >> PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/PostgreSQL/9.1/bin >> PWD=/home/postgres >> LANG=zh_CN.UTF-8 >> SHLVL=1 >> HOME=/home/postgres >> LANGUAGE=zh_CN:zh >> LOGNAME=postgres >> PGDATA=/raid/PostgreSQL/data >> LESSOPEN=| /usr/bin/lesspipe %s >> LESSCLOSE=/usr/bin/lesspipe %s %s >> _=/usr/bin/env >> >> To make top/vi work, I just need to unset LD_LIBRARY_PATH. >> >> 于2011年9月18日 13:31:45,Scott Marlowe写到: >>> >>> 2011/9/17 Rural Hunter<ruralhunter@gmail.com>: >>>> >>>> I installed pgsql 9.1 on Ubuntu server(10.10). Now I have a problem with >>>> the >>>> required env variable LD_LIBRARY_PATH. If I do not set this, I can not >>>> use >>>> some pg tools such as pg_dump, createuser...etc. If I set this variable, >>>> my >>>> term gets warning "unknown terminal type" for some linux commands such as >>>> top/vi so that I can not use them normally: >>>> postgres@backup:~$ top >>>> 'linux': unknown terminal type. >>> >>> How exactly are you setting it? >>> >> >> >> > > > > -- > To understand recursion, one must first understand recursion. > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin
Well, I installed pg by the official one-click graphic installer(http://www.enterprisedb.com/products/pgdownload.do). But ahh, when I tried to get an error message if I don't set LD_LIBRARY_PATH, I found it's now working without this variable. The variable was added into my env for 9.1rc. If I don't add it I got this error: postgres@backup:~$ createuser createuser: error while loading shared libraries: liblber-2.3.so.0: cannot open shared object file: No such file or directory I searched net and found the solution to add LD_LIBRARY_PATH into env. but looks it's not needed any more in the final release. So my problem is resolved. Thank you all. 于 2011/9/18 23:25, Peter Eisentraut 写道: > On sön, 2011-09-18 at 22:41 +0800, Rural Hunter wrote: >> I didn't install anything else there: > (for a very small value of "anything else") > > It looks like you have some version of libncurses in there, which is > prone to interfere with the operating system installation. > > I suppose you got this installation from some third-party installer. So > you might want to check their precise installation instructions, or > report a bug if they don't work. I think setting LD_LIBRARY_PATH should > not actually be necessary. > > Alternatively, install the official Ubuntu package. > > >> postgres@backup:~$ ls -l /opt/PostgreSQL/9.1/lib/ >> Total 9804 >> -rwxr-xr-- 1 root daemon 1366272 2011-09-09 13:45 libcrypto.so.6 >> -rw-r--r-- 1 root daemon 149938 2011-09-09 13:44 libecpg.a >> -rw-r--r-- 1 root daemon 18852 2011-09-09 13:44 libecpg_compat.a >> -rwxr-xr-x 1 root daemon 23327 2011-09-09 14:03 libecpg_compat.so >> -rwxr-xr-x 1 root daemon 23327 2011-09-09 14:03 libecpg_compat.so.3 >> -rwxr-xr-x 1 root daemon 23327 2011-09-09 14:03 libecpg_compat.so.3.3 >> -rwxr-xr-x 1 root daemon 87003 2011-09-09 14:03 libecpg.so >> -rwxr-xr-x 1 root daemon 87003 2011-09-09 14:03 libecpg.so.6 >> -rwxr-xr-x 1 root daemon 87003 2011-09-09 14:03 libecpg.so.6.3 >> -rwxr-xr-- 1 root daemon 192738 2011-09-09 13:45 libedit.so >> lrwxrwxrwx 1 root root 17 2011-09-13 13:47 libjpeg.so -> >> libjpeg.so.62.0.0 >> lrwxrwxrwx 1 root root 17 2011-09-13 13:47 libjpeg.so.62 -> >> libjpeg.so.62.0.0 >> -rwxr-xr-- 1 root daemon 138936 2011-09-09 13:45 libjpeg.so.62.0.0 >> -rwxr-xr-- 1 root daemon 59040 2011-09-09 13:45 liblber-2.3.so.0 >> -rwxr-xr-- 1 root daemon 241360 2011-09-09 13:45 libldap-2.3.so.0 >> -rwxr-xr-- 1 root daemon 260568 2011-09-09 13:45 libldap_r-2.3.so.0 >> lrwxrwxrwx 1 root root 15 2011-09-13 13:47 libncurses.so -> >> libncurses.so.5 >> lrwxrwxrwx 1 root root 17 2011-09-13 13:47 libncurses.so.5 -> >> libncurses.so.5.5 >> -rwxr-xr-- 1 root daemon 380336 2011-09-09 13:45 libncurses.so.5.5 >> -rw-r--r-- 1 root daemon 60292 2011-09-09 13:43 libpgport.a >> -rw-r--r-- 1 root daemon 101184 2011-09-09 13:44 libpgtypes.a >> -rwxr-xr-x 1 root daemon 68966 2011-09-09 14:03 libpgtypes.so >> -rwxr-xr-x 1 root daemon 68966 2011-09-09 14:03 libpgtypes.so.3 >> -rwxr-xr-x 1 root daemon 68966 2011-09-09 14:03 libpgtypes.so.3.2 >> lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libpng12.so -> >> libpng12.so.0.10.0 >> lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libpng12.so.0 -> >> libpng12.so.0.10.0 >> -rwxr-xr-- 1 root daemon 149520 2011-09-09 13:45 libpng12.so.0.10.0 >> -rw-r--r-- 1 root daemon 286182 2011-09-09 13:44 libpq.a >> -rwxr-xr-x 1 root daemon 189815 2011-09-09 14:03 libpq.so >> -rwxr-xr-x 1 root daemon 189815 2011-09-09 14:03 libpq.so.5 >> -rwxr-xr-x 1 root daemon 189815 2011-09-09 14:03 libpq.so.5.4 >> -rwxr-xr-- 1 root daemon 105464 2011-09-09 13:45 libsasl2.so.2 >> -rwxr-xr-- 1 root daemon 315032 2011-09-09 13:45 libssl.so.6 >> lrwxrwxrwx 1 root root 13 2011-09-13 13:47 libtermcap.so.2 -> >> libncurses.so >> lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libuuid.so -> >> libuuid.so.16.0.22 >> lrwxrwxrwx 1 root root 14 2011-09-13 13:47 libuuid.so.1 -> >> libuuid.so.1.2 >> -rwxr-xr-- 1 root daemon 17728 2011-09-09 13:45 libuuid.so.1.2 >> lrwxrwxrwx 1 root root 18 2011-09-13 13:47 libuuid.so.16 -> >> libuuid.so.16.0.22 >> -rw-r--r-- 1 root daemon 51937 2011-09-09 13:45 libuuid.so.16.0.22 >> -rwxr-xr-- 1 root daemon 4157970 2011-09-09 13:45 libxml2.so.2 >> -rwxr-xr-- 1 root daemon 822303 2011-09-09 14:03 libxslt.so.1 >> drwxr-xr-x 4 root daemon 4096 2011-08-25 11:20 postgresql >> >> 于2011年9月18日 21:58:17,Peter Eisentraut写到: >>> On sön, 2011-09-18 at 14:56 +0800, Rural Hunter wrote: >>>> This is my env: >>>> postgres@backup:~$ env >>>> MANPATH=:/opt/PostgreSQL/9.1/share/man >>>> SHELL=/bin/bash >>>> TERM=linux >>>> USER=postgres >>>> LD_LIBRARY_PATH=/opt/PostgreSQL/9.1/lib/ >>>> PGPORT=3500 >>>> LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35: >> *.x >>>> wd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: >>>> PGUSER=postgres >>>> PGDATABASE=postgres >>>> MAIL=/var/mail/postgres >>>> PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/PostgreSQL/9.1/bin >>>> PWD=/home/postgres >>>> LANG=zh_CN.UTF-8 >>>> SHLVL=1 >>>> HOME=/home/postgres >>>> LANGUAGE=zh_CN:zh >>>> LOGNAME=postgres >>>> PGDATA=/raid/PostgreSQL/data >>>> LESSOPEN=| /usr/bin/lesspipe %s >>>> LESSCLOSE=/usr/bin/lesspipe %s %s >>>> _=/usr/bin/env >>>> >>>> To make top/vi work, I just need to unset LD_LIBRARY_PATH. >>> What else do you have installed in /opt/PostgreSQL/9.1/lib/? Can you >>> show a directory listing? >>> >>> >>> >> >> > > >
On Sun, Sep 18, 2011 at 8:00 PM, Rural Hunter <ruralhunter@gmail.com> wrote: > Well, I installed pg by the official one-click graphic > installer(http://www.enterprisedb.com/products/pgdownload.do). But ahh, when > I tried to get an error message if I don't set LD_LIBRARY_PATH, I found it's > now working without this variable. The variable was added into my env for > 9.1rc. If I don't add it I got this error: > postgres@backup:~$ createuser > createuser: error while loading shared libraries: liblber-2.3.so.0: cannot > open shared object file: No such file or directory > > I searched net and found the solution to add LD_LIBRARY_PATH into env. but > looks it's not needed any more in the final release. So my problem is > resolved. Thank you all. for future reference the other way to do it is to put an entry into /etc/ld.so.conf and run sudo ldconfig to set it for the whole system. For ubuntu I use packages from the PGDG repo or I build from source. Having had to apply two patches to production in the past 3 years, I now just build from source because it's so much easier and faster to apply patches that way than to either way for the next release or build my own.