安装 Ruby on Rails 时出错

安装 Ruby on Rails 时出错

我被咨询了文档(如何在 Ubuntu 上使用 Passenger 安装 Rails 和 nginx)。目前我正在使用Ubuntu 14.04.4 LTS。这次我首先安装 ruby​​ 和 rails。我该如何解决这个问题??

rvm install 2.3.1
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/ubuntu/14.04/x86_64/ruby-2.3.1.tar.bz2
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system.
Installing required packages: libyaml-dev, sqlite3, libgmp-dev, libgdbm-dev, libncurses5-dev...
Error running 'requirements_debian_libs_install libyaml-dev sqlite3 libgmp-dev libgdbm-dev libncurses5-dev',
showing last 15 lines of /usr/local/rvm/log/1465971805_ruby-2.3.1/package_install_libyaml-dev_sqlite3_libgmp-dev_libgdbm-dev_libncurses5-dev.log
Building dependency tree...
Reading state information...
Package libncurses5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libtinfo-dev

E: Unable to locate package libyaml-dev
E: Unable to locate package sqlite3
E: Unable to locate package libgmp-dev
E: Unable to locate package libgdbm-dev
E: Package 'libncurses5-dev' has no installation candidate
++ return 100
++ return 100
Requirements installation failed with status: 100.

答案1

似乎缺少一些依赖项。运行apt-get update并检查导致 404 错误的依赖项。然后转到/etc/apt/sources.list并注释掉这些依赖项。

相关内容