![在 Debian Lenny 上安装 Ruby 1.9.2 和 rvm 时出现问题](https://linux22.com/image/1309764/%E5%9C%A8%20Debian%20Lenny%20%E4%B8%8A%E5%AE%89%E8%A3%85%20Ruby%201.9.2%20%E5%92%8C%20rvm%20%E6%97%B6%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98.png)
我目前有 Ruby 1.9.1(不好),想在 rvm 下安装 1.9.3。但是,rvm requirements
给出了一个很长的列表,其中大多数安装正常:
install build-essential openssl libreadline6 [...] bison subversion
但我在这里遇到了一个问题:
/# apt-get install libreadline6
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package libreadline6
我需要libreadline6
先安装 Ruby 1.9.3,有什么好的方法吗?
我的来源列表:
deb http://ftp.cn.debian.org/debian-volatile lenny/volatile main
deb-src http://ftp.cn.debian.org/debian-volatile lenny/volatile main
deb http://archive.debian.org/debian/ lenny main contrib
deb http://archive.debian.org/debian-security/ lenny/updates main contrib
更新: 查找可用的源 URL(已更新上述内容),安装了除 libreadline6 和 libreadlin6-dev 之外的所有源,但 Lenny 无法使用这两个源。找到解决方案后,我会在这里发布。
答案1
每当我为 Rails 应用程序创建新节点时,我都会有一个通用安装脚本,它会遍历并安装我需要的必要依赖项和包。我首先以 root 身份登录,然后运行以下命令。它适用于 Ubuntu 11.04、Ubutu 11.10 和 Ubuntu 12.04。这可能会帮助您解决问题。此命令将安装 Apache、PHP5、Ruby、Rails 和 Passenger。
sudo su
apt-get update && apt-get upgrade -y && apt-get install libopenssl-ruby build-essential nano libmagic-dev coffeescript zlib1g-dev libyaml-dev libssl-dev libmysqlclient16-dev ntp ntpdate apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libcurl4-openssl-dev apache2-prefork-dev libapr1-dev libaprutil1-dev samba smbfs libmagick9-dev git-core git-gui git-doc libreadline5-dev -y && a2enmod suexec rewrite ssl actions include && a2enmod dav_fs dav auth_digest && /etc/init.d/apache2 restart && wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz && tar zxf ruby-1.9.3-p125.tar.gz && cd ruby-1.9.3-p125 && ./configure && make && make install && && gem update --system && gem install rails && gem install passenger && passenger-install-apache2-module