I've hit a problem when trying to install Sympa on an Ubuntu Hardy server.
The problem seems related with the associated PostreSQL database.
Steps I followed:
1) Installed PostreSQL.
sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev
2) Updated PostgreSQL's administrator passwords. PostgreSQL creates two accounts for its "administrator". One is a "database account" (for logging in to postgresql itself) and another is a "linux account" (for creating files on the server, I guess). I reset the password of the database account like this:
sudo su postgres -c psql ALTER USER postgres WITH PASSWORD 'password'; \q
And then reset the "linux account" password the usual way:
sudo passwd -d postgres sudo su postgres -c passwd
3) Enabled password access on PostgreSQL. By default PostgreSQL only lets you log in with your linux name. So if you are logged in on linux as the user "tim", it only lets you enter the database as "tim". We want to change this so it asks you for a username and password, so you can log in as other people.
sudo nano /etc/postgresql/8.3/main/pg_hba.conf
On that file I updated the following lines:
#local all all ident sameuser local all all md5 #host all all 127.0.0.1/32 ident sameuser host all all 127.0.0.1/32 md5 #host all all ::1/128 ident sameuser host all all ::1/128 md5
4) Now it was time to install sympa. I just did this:
sudo apt-get install sympa
5) I was prompted to install lots of perl packages. I accepted the suggestions.
6) Then a dialog appeared and I answered 3 questions:
- What type of Database will you be using? PostgreSQL
- What is the hostname where your database is running? localhost
- What is the sympa user password? entered a password (twice)
- What is the db admin password? entered the password used on step 2)
At this point the installation shows the following messages:
/etc/sympa/sympa.conf file has been created /etc/sympa/wwsympa.conf file has been created * Reloading system log daemon... [ OK ] Upgrade::probe_db() Table user_table not found in database sympa Upgrade::probe_db() Table subscriber_table not found in database sympa Upgrade::probe_db() Table admin_table not found in database sympa DBD::Pg::db do failed: ERROR: permission denied to create database Upgrade::probe_db() Failed to run script '/usr/lib/sympa/bin/create_db.Pg' : ERROR: permission denied to create database DBD::Pg::st execute failed: ERROR: relation "user_table" does not exist List::get_user_db() Unable to execute SQL statement "SELECT email_user AS email, gecos_user AS gecos, password_user AS password, cookie_delay_user AS cookie_delay, lang_user AS lang , attributes_user AS attributes FROM user_table WHERE email_user = 'email@example.com' " : ERROR: relation "user_table" does not exist Language::SetLang() Language::SetLang(), missing locale parameter Database sympa defined in sympa.conf has not the right structure or is unreachable. If you don't use any database, comment db_xxx parameters in sympa.conf Sympa failed to prepare database. dpkg: error processing sympa (--configure): subprocess post-installation script returned error exit status 1 Errors were encountered while processing: sympa E: Sub-process /usr/bin/dpkg returned an error code (1)
The sympa database and user are, however, created on the database - I see them if I do:
sudo su postgres -c psql /du (list of users contains sympa) /l (list of databases contains sympa)
It looks as if the sympa installer isn't able to connect to posgre, and thus it doesn't find the tables it needs... and then reinterprets this as a "database missing" error.
I don't know how to trace this error. Any pointers would be appreciated.