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.

When in Ubuntu and I try to install a program not related to Moodle I get an error message that refers to Moodle processing errors:

# apt-get install screen

Reading package lists... Done
Building dependency tree       
Reading state information... Done
screen is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 162 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up moodle (1.9.9.dfsg2-3) ...
dbconfig-common: writing config to /etc/dbconfig-common/moodle.conf
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO).
unable to connect to mysql server.
error encountered creating user:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
dpkg: error processing moodle (--configure):
subprocess installed post-installation script returned error exit status 10
No apport report written because MaxReports is reached already

Errors were encountered while processing:
  moodle

E: Sub-process /usr/bin/dpkg returned an error code (1)

Why does this happen and how can Install software without this error / reference to Moodle?

I tried apt-get removing Moodle

root@bnserver:/var/crash# sudo apt-get remove moodle
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  moodle
0 upgraded, 0 newly installed, 1 to remove and 162 not upgraded.
1 not fully installed or removed.
After this operation, 53.8 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 184717 files and directories currently installed.)
Removing moodle ...
dpkg: error processing moodle (--remove):
 subprocess installed pre-removal script returned error exit status 10
No apport report written because MaxReports is reached already
                                                              dbconfig-common:     flushing administrative password
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 10
Errors were encountered while processing:
 moodle
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
    
this is very difficult to read, please fix the formatting! –  virtualxtc Dec 18 '13 at 7:19
    
Is your moodle configured and running? Because the process says moddle id not fully installed or removed. –  chaos Dec 18 '13 at 7:19
    
I tried apt-get removing Moodle –  Daniel Baker Dec 18 '13 at 7:28

1 Answer 1

This happens because the MySQL database that Moodle is trying to connect to doesn't recognize root as an authorized user. It's likely you need to set up MySQL properly before you can continue.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.