Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to use PostgreSQL PlPython3u on Ubuntu 12.04.
At first I run
create extension plpython3u
I has error, so I add python path to PATH

sudo su - postgres  
stop service /etc/init.d/postgresql-9.3  
export PATH=/opt/ActivePython-3.2/bin:$PATH  
start service /etc/init.d/postgres-9.3  
create extension plpython3u  

It work.

but when I add .pam_environment to postgres user $HOME (opt/PostgreSQL/9.3), add line

PYTHONHOME=/opt/ActivePython-3.2/  
PYTHONPATH=/opt/ActivePython-3.2/bin:$PATH  
LD_LIBRARY_PATH=/opt/ActivePython-3.2/lib/  
PATH=/opt/ActivePython-3.2/bin:$PATH  

reboot ubuntu

sudo su - postgres  
Here is env command  
$ env  
MAIL=/var/mail/postgres  
USER=postgres  
HOME=/opt/PostgreSQL/9.3  
XDG_SESSION_COOKIE=321d497f10d151a0151ced5f00000002-1380596092.235379-1768086829  
COLORTERM=gnome-terminal  
LOGNAME=postgres  
TERM=xterm  
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games  
DISPLAY=:0  
LANG=en_US.UTF-8  
XAUTHORITY=/home/tuan/.Xauthority  
SHELL=/bin/sh  
PWD=/opt/PostgreSQL/9.3  
$   

Why my .pam_environment don't work.
Please help. Thanks in advance

share|improve this question
    
Adding python to the path should not have any effect on PL/Python. Why are you using ActivePython anyway? –  Peter Eisentraut Oct 10 '13 at 20:41
    
I am using EnterpriseDB PostgreSQL on windows with ActivePython, it work well. So I want to use EnterpriseDB PostgreSQL & ActivePython on Ubuntu. –  Tuan Hoang Anh Oct 12 '13 at 15:49
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.