apt-get update redmine: E: Sub-process /usr/bin/dpkg returned an error code (1)
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/
dbconfig-common: writing config to /etc/dbconfig-
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/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
Gem::LoadError: mysql is not part of the bundle. Add it to Gemfile.
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
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/
ProcVersionSign
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
PackageArchitec
SourcePackage: redmine
UpgradeStatus: Upgraded to xenial on 2016-06-13 (34 days ago)
GETAROUND: default/ database. yml
sudo nano /etc/redmine/
- change line
adapter: mysql
- to
adapter: mysql2
sudo apt-get install --fix-broken
- completes successfully
CAUSE: redmine/ Gemfile includes redmine/ config/ database. yml -> /etc/redmine/ default/ database. yml default/ database. yml default/ database. yml
The issue is that database mysql is specified where mysql2 should be used
/usr/share/
/usr/share/
ls -l /etc/redmine/
-r--r----- 1 www-data www-data 151 Jun 12 23:56 /etc/redmine/
apt-cache policy redmine us.archive. ubuntu. com/ubuntu xenial/universe amd64 Packages us.archive. ubuntu. com/ubuntu xenial/universe i386 Packages dpkg/status
redmine:
Installed: 3.2.1-2
Candidate: 3.2.1-2
Version table:
*** 3.2.1-2 500
500 http://
500 http://
100 /var/lib/