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

Bug #1603817 reported by Richard
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
redmine (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

SYMPTOM:
some apt-get update operation hangs or fails with error message E: Sub-process /usr/bin/dpkg returned an error code (1)

IMPACT:
Any subsequent package operation fails since there are broken packages

DIAGNOSE:
apt-get install --fix-broken
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up redmine (3.2.1-2) ...
Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
dbconfig-common: writing config to /etc/dbconfig-common/redmine/instances/default.conf
dbconfig-common: flushing administrative password
rake aborted!
Gem::LoadError: Specified 'mysql' for database adapter, but the gem is not loaded. Add `gem 'mysql'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/usr/share/redmine/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `eval'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `each'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
Gem::LoadError: mysql is not part of the bundle. Add it to Gemfile.
/usr/share/redmine/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `eval'
/usr/share/redmine/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `each'
/usr/share/redmine/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
dpkg: error processing package redmine (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: redmine 3.2.1-2 [modified: usr/share/redmine/config/environment.rb]
ProcVersionSignature: Ubuntu 4.4.0-24.43-generic 4.4.10
Uname: Linux 4.4.0-24-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Sun Jul 17 13:26:13 2016
PackageArchitecture: all
SourcePackage: redmine
UpgradeStatus: Upgraded to xenial on 2016-06-13 (34 days ago)

Revision history for this message
Richard (ismail-a) wrote :
Revision history for this message
Richard (ismail-a) wrote :

GETAROUND:
sudo nano /etc/redmine/default/database.yml
- change line
  adapter: mysql
- to
  adapter: mysql2
sudo apt-get install --fix-broken
- completes successfully

CAUSE:
The issue is that database mysql is specified where mysql2 should be used
/usr/share/redmine/Gemfile includes
/usr/share/redmine/config/database.yml -> /etc/redmine/default/database.yml
ls -l /etc/redmine/default/database.yml
-r--r----- 1 www-data www-data 151 Jun 12 23:56 /etc/redmine/default/database.yml

apt-cache policy redmine
redmine:
  Installed: 3.2.1-2
  Candidate: 3.2.1-2
  Version table:
 *** 3.2.1-2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Richard (ismail-a) wrote :

This has been broken for a while.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in redmine (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.