Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.59 KB | None | 0 0
  1. Do you want to continue? [Y/n] y
  2. dpkg: error processing package redmine (--configure):
  3. package redmine is not ready for configuration
  4. cannot configure (current status 'half-installed')
  5. Errors were encountered while processing:
  6. redmine
  7. E: Sub-process /usr/bin/dpkg returned an error code (1)
  8.  
  9. Do you want to continue? [Y/n] y
  10. dpkg: error processing package redmine (--remove):
  11. package is in a very bad inconsistent state; you should
  12. reinstall it before attempting a removal
  13. Errors were encountered while processing:
  14. redmine
  15. E: Sub-process /usr/bin/dpkg returned an error code (1)
  16.  
  17. Preparing to unpack .../redmine_3.2.1-2_all.deb ...
  18. Unpacking redmine (3.2.1-2) over (3.2.1-2) ...
  19. ls: cannot access '/etc/redmine/*/database.yml': No such file or directory
  20. dirname: missing operand
  21. Try 'dirname --help' for more information.
  22. basename: missing operand
  23. Try 'basename --help' for more information.
  24. dpkg: warning: subprocess old post-removal script returned error exit status 123
  25. dpkg: trying script from the new package instead ...
  26. ls: cannot access '/etc/redmine/*/database.yml': No such file or directory
  27. dirname: missing operand
  28. Try 'dirname --help' for more information.
  29. basename: missing operand
  30. Try 'basename --help' for more information.
  31. dpkg: error processing archive /var/cache/apt/archives /redmine_3.2.1-2_all.deb (--unpack):
  32. subprocess new post-removal script returned error exit status 123
  33. ls: cannot access '/etc/redmine/*/database.yml': No such file or directory
  34. dirname: missing operand
  35. Try 'dirname --help' for more information.
  36. basename: missing operand
  37. Try 'basename --help' for more information.
  38. dpkg: error while cleaning up:
  39. subprocess new post-removal script returned error exit status 123
  40. Errors were encountered while processing:
  41. /var/cache/apt/archives/redmine_3.2.1-2_all.deb
  42. E: Sub-process /usr/bin/dpkg returned an error code (1)
  43.  
  44. dpkg: warning: overriding problem because --force enabled:
  45. dpkg: warning: package is in a very bad inconsistent state; you should
  46. reinstall it before attempting a removal
  47. (Reading database ... 409396 files and directories currently installed.)
  48. Removing redmine (3.2.1-2) ...
  49. ls: cannot access '/etc/redmine/*/database.yml': No such file or directory
  50. dirname: missing operand
  51. Try 'dirname --help' for more information.
  52. basename: missing operand
  53. Try 'basename --help' for more information.
  54. dpkg: error processing package redmine (--remove):
  55. subprocess installed post-removal script returned error exit status 123
  56. Errors were encountered while processing:
  57. redmine
  58.  
  59. dpkg: warning: overriding problem because --force enabled:
  60. dpkg: warning: package is in a very bad inconsistent state; you should
  61. reinstall it before attempting a removal
  62. dpkg: warning: files list file for package 'redmine-sqlite' missing; assuming package has no files currently installed
  63. dpkg: warning: files list file for package 'redmine-mysql' missing; assuming package has no files currently installed
  64. (Reading database ... 409382 files and directories currently installed.)
  65. Removing redmine (3.2.1-2) ...
  66.  
  67. rake aborted!
  68. Cannot load `Rails.application.database_configuration`:
  69. Could not load database configuration. No such file - ["/usr/share/redmine/instances/default/config/database.yml"]
  70.  
  71. ls: cannot access '/etc/redmine/*/database.yml': No such file or directory
  72.  
  73. $ cat /var/lib/dpkg/info/redmine.postrm
  74. #!/bin/sh
  75.  
  76. set -e
  77.  
  78. . /usr/share/debconf/confmodule
  79. if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
  80. . /usr/share/dbconfig-common/dpkg/postrm
  81.  
  82. # remove both current and old instances
  83. # START OF THE COMMENTED SECTION TO AVOID CRASHES
  84. # instances=$(ls -1 /etc/redmine/*/database.yml | xargs dirname | xargs -n 1 basename)
  85. # for inst in $instances; do
  86. # dbc_go redmine/instances/$inst "$@"
  87. # done
  88. # END OF THE COMMENTED SECTION TO AVOID CRASHES
  89. fi
  90.  
  91. if [ "$1" = purge ]; then
  92. rm -rf /var/log/redmine
  93. rm -rf /var/cache/redmine
  94. rm -rf /var/lib/redmine
  95. rm -rf /etc/redmine
  96. fi
  97.  
  98. ## Automatically added by dh_installdebconf
  99. if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
  100. . /usr/share/debconf/confmodule
  101. db_purge
  102. fi
  103. # End automatically added section
  104. #
  105.  
  106. sudo apt-get remove redmine --purge
  107.  
  108. sudo apt-get update && sudo apt-get install redmine redmine-mysql
  109.  
  110. Configurando redmine (3.2.1-2) ...
  111. Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
  112. dbconfig-common: writing config to /etc/dbconfig-common/redmine/instances/default.conf
  113. Not replacing deleted config file /etc/redmine/default/database.yml
  114. granting access to database redmine_default for redmine/instance@localhost: already exists.
  115. creating database redmine_default: already exists.
  116. dbconfig-common: flushing administrative password
  117. rake aborted!
  118. Cannot load 'Rails.application.database_configuration':
  119. Could not load database configuration. No such file - ["/usr/share/redmine/instances/default/config/database.yml"]
  120. /usr/share/redmine/lib/plugins/acts_as_activity_provider/init.rb:2:in 'block in <top (required)>'
  121. /usr/share/redmine/config/initializers/00-core_plugins.rb:12:in 'eval'
  122. /usr/share/redmine/config/initializers/00-core_plugins.rb:12:in 'block in <top (required)>'
  123. /usr/share/redmine/config/initializers/00-core_plugins.rb:2:in 'each'
  124. /usr/share/redmine/config/initializers/00-core_plugins.rb:2:in '<top (required)>'
  125. /usr/share/redmine/config/environment.rb:14:in '<top (required)>'
  126. /var/lib/gems/2.3.0/gems/rake-11.3.0/exe/rake:27:in '<top (required)>'
  127. /var/lib/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:74:in 'load'
  128. /var/lib/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:74:in 'kernel_load'
  129. /var/lib/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:27:in 'run'
  130. /var/lib/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/cli.rb:332:in 'exec'
  131. /var/lib/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in 'run'
  132. /var/lib/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in 'invoke_command'
  133. /var/lib/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor.rb:359:in 'dispatch'
  134. /var/lib/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/cli.rb:20:in 'dispatch'
  135. /var/lib/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  136. /var/lib/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/cli.rb:11:in 'start'
  137. /var/lib/gems/2.3.0/gems/bundler-1.13.1/exe/bundle:34:in 'block in <top (required)>'
  138. /var/lib/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/friendly_errors.rb:100:in 'with_friendly_errors'
  139. /var/lib/gems/2.3.0/gems/bundler-1.13.1/exe/bundle:26:in '<top (required)>'
  140.  
  141. Could not load database configuration. No such file - ["/usr/share/redmine/instances/default/config/database.yml"]
  142.  
  143. cat /usr/share/redmine/instances/default/config/database.yml
  144. # Setup is given for MySQL with ruby1.9.
  145. # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
  146. # Line indentation must be 2 spaces (no tabs).
  147.  
  148. production:
  149. adapter: mysql2
  150. database: redmine_default
  151. host: localhost
  152. username: root
  153. password: "MySQLRootPassword"
  154. encoding: utf8
  155. development:
  156. adapter: mysql2
  157. database: redmine_default
  158. host: localhost
  159. username: root
  160. password: ""
  161. encoding: utf8
  162. # Warning: The database defined as "test" will be erased and
  163. # re-generated from your development database when you run "rake".
  164. # Do not set this db to the same as development or production.
  165. test:
  166. adapter: mysql2
  167. database: redmine_test
  168. host: localhost
  169. username: root
  170. password: ""
  171. encoding: utf8
  172.  
  173. sudo cp /usr/share/redmine/config/database.yml /usr/share/redmine/instances/default/config/database.yml
  174.  
  175. sudo apt-get -f install
  176.  
  177. /usr/local/bin/bundle:23:in 'load': cannot load such file -- /usr/share/rubygems-integration/all/gems/bundler-1.11.2/exe/bundle (LoadError)
  178. from /usr/local/bin/bundle:23:in '<main>'
  179.  
  180. dbconfig-common: flushing administrative password
  181. Could not find gem 'mysql2 (~> 0.4.0)' in any of the gem sources listed in your Gemfile or available on this machine.
  182. Run `bundle install` to install missing gems.
  183.  
  184. Fetching: mysql2-0.4.4.gem (100%)
  185. Building native extensions. This could take a while...
  186. ERROR: Error installing mysql2:
  187. ERROR: Failed to build gem native extension.̀
  188.  
  189. [!] There was an error parsing 'Gemfile': undefined method 'values' for "Setup is given for MySQL with ruby1.9.":String. Bundler cannot continue.
  190. # from /usr/share/redmine/Gemfile:67
  191. # -------------------------------------------
  192. # database_config = YAML::load(ERB.new(IO.read(database_file)).result)
  193. > adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
  194. # if adapters.any?
  195. # -------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement