zoukankan      html  css  js  c++  java
  • ubuntu下配置ruby时遇到问题(二)

    1, 查看系统,核心版本。

    uname -a

    less /proc/version

    lsb_release -a 这个比较详细。

    2,Ubuntu下apt-get update/upgrade 不能工作的解决办法。

    1> gedit /etc/apt/sources.list 然后替换为下面的内容。或者替换为163的镜像文件sources.list, 在上一篇有列出。

    #deb cdrom:[Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429)]/ lucid main restricted
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    
    deb http://cn.archive.ubuntu.com/ubuntu/ lucid main restricted
    deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://cn.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
    deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://cn.archive.ubuntu.com/ubuntu/ lucid universe
    deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid universe
    deb http://cn.archive.ubuntu.com/ubuntu/ lucid-updates universe
    deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
    ## team, and may not be under a free licence. Please satisfy yourself as to 
    ## your rights to use the software. Also, please note that software in 
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://cn.archive.ubuntu.com/ubuntu/ lucid multiverse
    deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid multiverse
    deb http://cn.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
    deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
    
    ## Uncomment the following two lines to add software from the 'backports'
    ## repository.
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    # deb http://cn.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu lucid partner
    # deb-src http://archive.canonical.com/ubuntu lucid partner
    
    deb http://security.ubuntu.com/ubuntu lucid-security main restricted
    deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted
    deb http://security.ubuntu.com/ubuntu lucid-security universe
    deb-src http://security.ubuntu.com/ubuntu lucid-security universe
    deb http://security.ubuntu.com/ubuntu lucid-security multiverse
    deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse

    2> 安装sudo apt-get install curl 试试功能。如果仍然不行,

    sudo apt-get install update /upgrade

    如果可以就安装 sudo apt-get install curl 及其下面的命令, ruby要调为

    sudo apt-cache search ruby 用来查看有哪些RUBY包可安装。
    sudo apt-get install ruby #但是默认装的是1.8,我想更新到1.9的高版本。
    sudo apt-get install irb  #装用于调试的irb
    sudo apt-get install ri     ri如何使用,我还没有用会。

    ==========================================
    sudo apt-get install curl    安装curl
    curl -L get.rvm.io|bash -s stable --ruby       安装rvm。
    source ~/.rvm/scripts/rvm     使其生效
    rvm -v        显示rvm版本号,表示安装成功。
    rvm list known     查看有哪些可安装
    rvm install 1.9.3      安装ruby 1.9.3的版本。
    rvm use 1.9.3 --default     设置为默认的版本。rvm可使几个版本共存。
    rvm list          查看已经安装的ruby
    rvm remove 1.8.0 可用来卸载一个已安装版本
    sudo  apt-get install rubygems   安装gem, 为cucumber做准备。
    gem list         安装成功后查看,一般会自带几个安装好的组件
    gem install cucumber    安装cucumber
    cucumber --version    查看即知是否安装成功。

    3, 如果以上方法都行不通,我只有换10.04版了。

  • 相关阅读:
    改了一下分辨率,Areo特效奇迹般的恢复了...
    此连接需要活动的Internet连接
    Apple Mac OS X每日一技巧026:Spotlight打开文件所在的文件夹
    WP7有约(八):在ListPicker控件的选择页面上播放铃声
    WP7有约(七):实现铃声设置的播放图标的效果
    WP7有约(五):回到主页
    WP7有约:一个应用的破蛋过程
    WP7有约(六):AppBarUtils使用指南
    IE与firefox事件处理
    C#试题
  • 原文地址:https://www.cnblogs.com/mover/p/3501786.html
Copyright © 2011-2022 走看看