2017-08-18 99 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 

這發生在那些誰安裝的管理平臺作爲根我猜(所以沒有我)。