我正在尝试在Ubuntu 18.04上安装Rails&Sinatra。我尝试了各种方法,但是每个方法都会引发某些错误。我已经尝试了gem,rbenv,apt安装,但是所有的尝试都是徒劳的。
apt install ruby-railties
引发依赖项错误。
The following packages have unmet dependencies.
ruby-railties : Depends: rake (>= 0.8.7) but it is not installable
Depends: ruby but it is not installable or
ruby-interpreter but it is not installable
Depends: ruby-actionpack (= 2:4.2.10-0ubuntu4) but it is not going to be installed
Depends: ruby-activesupport (= 2:4.2.10-0ubuntu4) but it is not going to be installed
Depends: ruby-thor (< 2.0) but it is not going to be installed
Depends: ruby-thor (>= 0.18.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
gem install rails
引发以下错误,我通过禁用ipv6以及所有其他措施(但没有结果)进行了各种尝试来纠正。
ERROR: Could not find a valid gem 'rails' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - timed out (https://rubygems.org/specs.4.8.gz)