package moodle 1.9.4.dfsg-0ubuntu4 failed to install/upgrade: exit status 1 - ERROR: role "moodle" already exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
moodle (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: moodle
Database connection failed. After fixing up php.ini where the default memory_limit in Ubuntu is too small for Moodle 1.9 and restarting apache a pop-up window requests that "sudo dpkg-reconfigue moodle" be run. When this is run the database connection fails. The following solution has worked with a previous version of Ubuntu but is not currently functional.
The workaround is to remove --purge everything vaguely related to postgresql, remove moodle and start again.
rm -rf /var/lib/postgresql after saving its content in needed.
sudo aptitude purge cl-sql-postgresql odbc-postgresql \
postgresql-8.4 postgresql-
sudo apt-get remove --purge postgresql-
sudo find / -name postgresql -exec rm -Rf {} \; removes users.
sudo find / -name pgsql -exec rm -Rf {} \;
sudo find / -name psql -exec rm -Rf {} \;
apt-get -f install
apt-get remove --purge moodle
edit /etc/php5/
apt-get install postresql-8.4
apt-get install moodle
Some things work sometimes. In a previous install of moodle (about a year ago) reloading libgd2-xpm caused it to start working. Moodle has broken every attempt at installation on Debian and Ubuntu for many years. The problem most often turns out to be php.ini related. If a reboot has been requested by an upgrade the above does not work until after the reboot has been performed.
Would it make sense to update the default php.ini to overcome this difficulty? Google is full of unsolved problems that appear to be the same as the one described. The suggested updates can be found here:
http://
moodle 1.9.4, Ubuntu 9.10, postgresql 8.4.2, apache2 2.2.12, php5 5.2.10
ProblemType: Package
AptOrdering:
moodle: Install
moodle: Configure
Architecture: amd64
Date: Tue Mar 9 04:40:01 2010
DistroRelease: Ubuntu 9.10
ErrorMessage: subprocess installed post-installation script returned error exit status 1
Package: moodle 1.9.4.dfsg-0ubuntu4
PackageArchitec
ProcVersionSign
SourcePackage: moodle
Title: package moodle 1.9.4.dfsg-0ubuntu4 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Uname: Linux 2.6.31-19-generic x86_64
tags: | added: karmic |
Thanks for your report.
The relevant error is dfsg-0ubuntu4) ...
---
Setting up moodle (1.9.4.
Creating config file /etc/moodle/ apache. conf with new version
Creating config file /etc/moodle/ config. php with new version /8.4/main/ pg_hba. conf do not allow me to continue. 65534(nogroup)
[Tue Mar 09 04:40:01 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
[Tue Mar 09 04:40:01 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
Your settings in /etc/postgresql
uid=120(moodle) gid=65534(nogroup) groups=
ERROR: role "moodle" already exists
dpkg: error processing moodle (--configure):
subprocess installed post-installation script returned error exit status 1
It looks like the script tries to recreate the schema even if it already exists.