2017-08-18 67 views
1

16.04休息,我有以下设置:管理平台3.2.1-2 OB的Ubuntu上容易升级

  • 的Ubuntu 16.04 LXC/LXD主机运行几个LXC容器
  • 一个容器中运行管理平台3.2。 - 2在Ubuntu 16.04客户操作系统上,使用Rails 5.0.1和Bundler 1.13.6
  • Redmine数据库在另一个lxc数据库容器上
  • Redmine guest虚拟机被配置为自动执行安全升级。

此设置工作相当好没有问题。但由于某些原因的东西在设置坏了,每次我执行sudo apt update; sudo apt upgrade升级有错误和管理平台停止停止工作:

Reading package lists... Done 
Building dependency tree 
Reading state information... Done 
Calculating upgrade... Done 
0 upgraded, 0 newly installed, 0 to remove and 0 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 redmine (3.2.1-2) ... 
Bundler could not find compatible versions for gem "actionpack": 
    In Gemfile: 
actionpack-action_caching was resolved to 1.2.0, which depends on 
    actionpack (< 6, >= 4.0.0) 

actionpack-xml_parser was resolved to 2.0.0, which depends on 
    actionpack (~> 5.x) 

rails (~> 4.2.5) was resolved to 4.2.9, which depends on 
    actionpack (= 4.2.9) 

rails (~> 4.2.5) was resolved to 4.2.9, which depends on 
    actionpack (= 4.2.9) 

rails (~> 4.2.5) was resolved to 4.2.9, which depends on 
    actionpack (= 4.2.9) 
Bundler could not find compatible versions for gem "rspec-core": 
    In Gemfile: 
rspec (~> 2.0) was resolved to 2.99.0, which depends on 
    rspec-core (~> 2.99.0) 

rspec-rails was resolved to 3.6.0, which depends on 
    rspec-core (~> 3.6.0) 
dpkg: error processing package redmine (--configure): 
subprocess installed post-installation script returned error exit status 6 
Errors were encountered while processing: 
redmine 
E: Sub-process /usr/bin/dpkg returned an error code (1)` 

但是,如果我跑bundle install\usr\share\redmine我得到下面的输出(没有错误! !),并再次管理平台的工作原理:

/usr/share/redmine/ bundle install 
Your Gemfile lists the gem poltergeist (>= 0) more than once. 
You should probably keep only one of them. 
While it's not a problem now, it could cause errors if you change the version of one of them later. 
Fetching gem metadata from https://rubygems.org/.......... 
Fetching version metadata from https://rubygems.org/.. 
Fetching dependency metadata from https://rubygems.org/. 
Resolving dependencies... 
Using rake 12.0.0 
Using i18n 0.8.6 
Using minitest 5.10.3 
Using thread_safe 0.3.6 
Using builder 3.2.3 
Using erubis 2.7.0 
Using mini_portile2 2.2.0 
Using rack 1.6.8 
Using mime-types-data 3.2016.0521 
Using arel 6.0.4 
Using public_suffix 2.0.5 
Using bundler 1.13.6 
Using coderay 1.1.1 
Using coffee-script-source 1.12.2 
Using execjs 2.7.0 
Using concurrent-ruby 1.0.5 
Using ffi 1.9.18 
Using temple 0.8.0 
Using tilt 2.0.8 
Using htmlentities 4.3.4 
Using thor 0.20.0 
Using mysql2 0.4.9 
Using net-ldap 0.16.0 
Using ruby-openid 2.7.0 
Using rb-fsevent 0.10.2 
Using rbpdf-font 1.19.1 
Using redcarpet 3.4.0 
Using request_store 1.3.2 
Using rmagick 2.16.0 
Using tzinfo 1.2.3 
Using nokogiri 1.8.0 
Using rack-test 0.6.3 
Using mime-types 3.1 
Using addressable 2.5.1 
Using coffee-script 2.4.1 
Using sprockets 3.7.1 
Using rb-inotify 0.9.10 
Using haml 5.0.2 
Using rack-openid 1.4.2 
Using rbpdf 1.19.2 
Using activesupport 4.2.9 
Using loofah 2.0.3 
Using mail 2.6.6 
Using css_parser 1.5.0 
Using sass-listen 4.0.0 
Using rails-deprecated_sanitizer 1.0.3 
Using globalid 0.4.0 
Using activemodel 4.2.9 
Using rails-html-sanitizer 1.0.3 
Using roadie 3.2.2 
Using sass 3.5.1 
Using rails-dom-testing 1.0.8 
Using activejob 4.2.9 
Using activerecord 4.2.9 
Using protected_attributes 1.1.4 
Using actionview 4.2.9 
Using actionpack 4.2.9 
Using actionmailer 4.2.9 
Using actionpack-action_caching 1.2.0 
Using actionpack-xml_parser 1.0.2 
Using railties 4.2.9 
Using sprockets-rails 3.2.0 
Using jquery-rails 4.3.1 
Using roadie-rails 1.2.1 
Using rails 4.2.9 
Bundle complete! 42 Gemfile dependencies, 65 gems now installed. 
Gems in the groups development and test were not installed. 
Use `bundle show [gemname]` to see where a bundled gem is installed. 

经过研究和反复试验小时,我终于没有更多的想法,什么是错的,如何解决这个问题。

+0

我建议通过RVM在用户帐户下安装Redmine,这样你不会受到系统的红宝石和一些第三方库更新的影响...... –

+0

这是我最后也是最不喜欢的选择,因为它是一个运行平稳的生产服务器除了描述的行为。 – alfred

回答

0

问题是位于位于/var/lib/dpkg/inforedmine.postinst脚本。

为了使它通过,只需注释掉这一行(#12):

chown www-data:www-data /var/lib/redmine/Gemfile.lock 

这发生在那些谁安装的管理平台作为根我猜(所以没有我)。