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

    系统为Ubuntu11.04,

    装好系统后,试图运行 sudo apt-get install ruby 时不成功,以下是最后几行最明显的错误。

    ###########我是分隔线##################

    sudo apt-get install ruby ..................

    错误 http://extras.ubuntu.com/ubuntu/ natty/main libreadline5 i386 5.2-7build1
      404  Not Found
    错误 http://extras.ubuntu.com/ubuntu/ natty/main libruby1.8 i386 1.8.7.302-2
      404  Not Found
    错误 http://extras.ubuntu.com/ubuntu/ natty/main ruby1.8 i386 1.8.7.302-2
      404  Not Found
    错误 http://extras.ubuntu.com/ubuntu/ natty/main ruby all 4.5
      404  Not Found
    无法下载 http://extras.ubuntu.com/ubuntu/pool/main/r/readline5/libreadline5_5.2-7build1_i386.deb  404  Not Found
    无法下载 http://extras.ubuntu.com/ubuntu/pool/main/r/ruby1.8/libruby1.8_1.8.7.302-2_i386.deb  404  Not Found
    无法下载 http://extras.ubuntu.com/ubuntu/pool/main/r/ruby1.8/ruby1.8_1.8.7.302-2_i386.deb  404  Not Found
    无法下载 http://extras.ubuntu.com/ubuntu/pool/main/r/ruby-defaults/ruby_4.5_all.deb  404  Not Found
    E: 有几个软件包无法下载,您可以运行 apt-get update 或者加上 --fix-missing 的选项再试试?

    ###########我是分隔线##################

    1,http://extras.ubuntu.com/ubuntu/pool/main/r/ruby-defaults/ruby_4.5_all.deb

    这些链接的确是在浏览器的确打不开,应该是指向的配置文件有问题,把错误信息拿到GOOGL里,找一篇比较类似的

    http://blog.csdn.net/chaihuasong/article/details/17009641

    我按这篇文章的解决方法,把/etc/apt/sources.list文件进行备份后,再贴文中10.04的sources.list文件替换掉原来的sources.list文件。

    sudo apt-get update  有个zip包仍然拿不到。
    sudo apt-get upgrade 成功

    sudo apt-get install ruby  成功安装1.8,ruby -v 信息正确。

    sudo apt-get install rubygems 安装显示成功,但gem list里面没有任何信息。

    gem install cucumber 不成功。

    明天继续看。11.04这个版本,与常用的10.04颇有差距啊。

    ===============================================================================

    ubuntu /etc/apt/source.list 格式说明 (转载)

    http://blog.csdn.net/neil_lee_/article/details/9137655

    Ubuntu 软件仓库被分为四个部分:main(主要的), restricted(受限的), universe(广泛的) and multiverse(多元的),这主要根据我们对软件的支持能力,以及软件的目的是否符合我们的 自由软件哲学。

    标准的 Ubuntu 安装是所有能从 main(主要的)和 restricted(受限的)软件库中获得的软件的一个子集,你可以用诸如 Synaptic Package Manager 或者 Aptitude 之类的软件安装程序来安装额外的软件,其他的软件仓库可以通过修改 /etc/apt/sources.list 文件来添加,请查看 “man sources.list” 来获得更多关于编辑 sources.list 文件的信息。

    “main(主要的)”软件库
    Main 部分的软件仓库包含了自由软件,这些软件可以被自由地重新分发,并且被 Ubuntu 团队完全支持。这主要包括目前可以得到的最流行的和最可靠的开源程序,它们中的大多数会在安装 Ubuntu 时候默认被安装。

    在 main 软件库中的软件包括可以手动选择的程序,Ubuntu 开发人员、社区和用户都觉得这些程序重要,并且 Ubuntu 安全和发行团队乐意支持这些程序。当你从 main 软件库中安装软件时,你可以放心,这些软件都会得到安全升级和技术支持。

    我们相信,在 main 中的软件包括了所有大多数人需要的软件,来用于一个全功能的桌面环境或者只运行开源软件的网络服务器。

    Main 中软件程序的许可证都必须是自由的,但是 main 中也可以包含一些二进制固件和选定的字体,要修改它们必须获得作者的同意。在任何情况下,重新分发都是不受妨碍的。

    “restricted(受限的)”软件库
    我们保留了受限软件库是因为有些常用软件虽然没有一个完全的自由软件许可证,但是 Ubuntu 团队仍然支持它们。请注意,我们无法为这些软件提供完全支持,因为我们不可以自行修改它们,而只能向软件的真正作者提交问题报告。

    受限仓库中的有些软件会被安装在 Ubuntu CD 里,但是被很清楚地分隔开来以保证可以很轻松地删除它们。我们包括进了这些软件是因为,如果要让 Ubuntu 在某些机器上运行,它们是必需的。典型的例子是,一些显卡制造商发行的二进制驱动是 Ubuntu 在这些机器上运行的唯一方法。默认情况下,我们只使用开源软件,除非根本没有其他方法来安装 Ubuntu 了。Ubuntu 团队努力促使这些制造商加速这些软件的开源,以保证尽可能多的软件可以在自由软件许可证下使用。

    “universe(广泛的)”软件库
    Universe 软件库是自由、开源软件和 Linux 世界的一个快照。在 universe 中你几乎可以找到每一种开源软件,以及可以在各种不太开放的许可证下使用的软件,它们都是在各种开放代码的基础上自动建造的。来自 main 的基础工具链和系统库被用来开发这些软件并且通常是和它们同步维护,所以这些软件应该可以很好地和 main 中的软件一起安装和运行,但是它们得不到安全补丁和支持。Universe 软件库中包含了上千种软件,通过他们,用户可以在稳定的 Ubuntu 内核之上获得由广阔的开源世界提供的多样性和可制定性。

    Canonical 公司不保证为 universe 软件库中的软件提供定期的安全升级,但是社区会提供这些升级。用户需要知道使用 universe 中的软件包所固有的风险。

    流行的或者支持良好的软件将会从 universe 移动到 main 中,如果维护者愿意支持并使之符合 Ubuntu 团队为 main 制定的一系列标准。

    “multiverse(多元的)”软件库
    The “multiverse(多元的)”软件库 contains software that is "not free", which means the licensing requirements of this software do not meet the Ubuntu "main" Component Licence Policy.

    请您自行检查您使用这些软件的权利并遵守版权持有人所制定的许可证条款。

    这些软件不被支持并且通常不能被修改或升级,使用它们须自行承担风险。

    本文转自:http://jiachenmianyu.iteye.com/blog/1403036

    ===============================================================================================

    http://www.liuzhigong.com/download/sources.list

    # 
    # deb cdrom:[Ubuntu-Server 10.10 _Maverick Meerkat_ - Release i386 (20101007)]/ maverick main restricted
    
    #deb cdrom:[Ubuntu-Server 10.10 _Maverick Meerkat_ - Release i386 (20101007)]/ maverick main restricted
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    
    # deb http://us.archive.ubuntu.com/ubuntu/ maverick main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ maverick main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    # deb http://us.archive.ubuntu.com/ubuntu/ maverick-updates main restricted
    # deb-src http://us.archive.ubuntu.com/ubuntu/ maverick-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://us.archive.ubuntu.com/ubuntu/ maverick universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ maverick universe
    # deb http://us.archive.ubuntu.com/ubuntu/ maverick-updates universe
    # deb-src http://us.archive.ubuntu.com/ubuntu/ maverick-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://us.archive.ubuntu.com/ubuntu/ maverick multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ maverick multiverse
    # deb http://us.archive.ubuntu.com/ubuntu/ maverick-updates multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ maverick-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://us.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ maverick-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 maverick partner
    # deb-src http://archive.canonical.com/ubuntu maverick partner
    
    ## Uncomment the following two lines to add software from Ubuntu's
    ## 'extras' repository.
    ## This software is not part of Ubuntu, but is offered by third-party
    ## developers who want to ship their latest software.
    # deb http://extras.ubuntu.com/ubuntu maverick main
    # deb-src http://extras.ubuntu.com/ubuntu maverick main
    
    # deb http://security.ubuntu.com/ubuntu maverick-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu maverick-security main restricted
    # deb http://security.ubuntu.com/ubuntu maverick-security universe
    # deb-src http://security.ubuntu.com/ubuntu maverick-security universe
    # deb http://security.ubuntu.com/ubuntu maverick-security multiverse
    # deb-src http://security.ubuntu.com/ubuntu maverick-security multiverse
    
    
    ##163
    deb http://mirrors.163.com/ubuntu/ lucid main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ lucid-security main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ lucid-updates main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ lucid-proposed main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ lucid-backports main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ lucid main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ lucid-security main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ lucid-updates main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ lucid-proposed main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ lucid-backports main restricted universe multiverse

    Ubuntu怎么安装这里就不多说了,这里主要说一下怎么提高Ubuntu下的软件下载安装速度。Ubuntu安装完成后使用apt-get install安装软件时经常会发现下载速度很慢,小的软件还好,大一点的软件要等大半天,急死人啊!!原因是Ubuntu默认更新源是国外的网站,其实 国内也有很多Ubuntu的开源镜像站(如网易163镜像站LUPA镜像站、CN99镜像站等)速度都灰常不错,只需要更新一下源就好啦,方法:

    编辑/etc/apt/sources.list文件,把里面的默认的都用#号注释掉(或全删掉)然后添加以下几行:

    ##163
    deb http://mirrors.163.com/ubuntu/ maverick main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ maverick-security main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ maverick-updates main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ maverick-proposed main restricted universe multiverse
    deb http://mirrors.163.com/ubuntu/ maverick-backports main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ maverick main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ maverick-security main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ maverick-updates main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ maverick-proposed main restricted universe multiverse
    deb-src http://mirrors.163.com/ubuntu/ maverick-backports main restricted universe multiverse

    注意了啊,红色标注的是用户名,可以在http://mirrors.163.com/ubuntu/dists/上直接看到,要是这里的不能用了就去上面找一组能用的,是一组,要全部改撒。。
     
    转载自:http://liuzhigong.blog.163.com/blog/static/17827237520121113103236820/

    ================================================================================================


  • 相关阅读:
    swiper 内容超出纵向滚动 解决办法
    js判断 微信浏览器 或者 QQ内置浏览器
    移动端滑动 增加弹性 滑动更加顺畅
    移动端点击激活时背景色
    文字两端对齐
    移动端元素被选中时,去除背景
    CSS动画 防止动画结束后,回归原位
    centos 防火墙配置
    知识图谱研究
    jmeter 压测工具
  • 原文地址:https://www.cnblogs.com/mover/p/3501148.html
Copyright © 2011-2022 走看看