Ubuntu
在 Rails 上安裝 Ruby 時出錯
我查閱了這份文件(如何在 Ubuntu 上使用Passenger 安裝Rails 和nginx)。目前我正在使用
Ubuntu 14.04.4 LTS
. 這次我第一次用rails安裝ruby ..我該如何解決這個問題??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.
看起來缺少一些依賴項。執行
apt-get update
並檢查產生 404 錯誤的依賴項。然後轉到/etc/apt/sources.list
並註釋掉這些依賴項。