如何配置 repo 以便可以轻松安装依赖项?

如何配置 repo 以便可以轻松安装依赖项?

我想安装 Vagrant。当我尝试安装 Vagrant(使用 dpkg -i 命令)时,出现如下错误:

 Package ruby-bundler is not installed.
 vagrant depends on ruby-childprocess (>= 0.3.7); however:
  Package ruby-childprocess is not installed.
 vagrant depends on ruby-erubis (>= 2.7.0); however:
  Package ruby-erubis is not installed.
 vagrant depends on ruby-i18n (>= 0.6.0); however:
  Package ruby-i18n is not installed.
 vagrant depends on ruby-listen; however:
  Package ruby-listen is not installed.
 vagrant depends on ruby-log4r (>= 1.1.9); however:
  Package ruby-log4r is not installed.
 vagrant depends on ruby-nokogiri; however:
  Package ruby-nokogiri is not installed.
 vagrant depends on ruby-rb-inotify; however:
  Package ruby-rb-inotify is not installed.
 vagrant depends on ruby-rest-client; however:
  Package ruby-rest-client is not installed.

当我尝试使用 apt-get 命令安装上述各个依赖项时,我看到如下错误:

E:软件包‘ruby-rest-client’没有安装候选项

是否有可以配置的存储库以便能够安装这些 ruby​​ 依赖项?我的 /etc/apt/sources.list 文件显示以下条目:

deb http:// us.archive.ubuntu.com/ubuntu/ trusty main
deb-src http:// us.archive.ubuntu.com/ubuntu/ trusty main

###### Ubuntu Update Repos
deb http:// us.archive.ubuntu.com/ubuntu/ trusty-security main
deb http:// us.archive.ubuntu.com/ubuntu/ trusty-updates main
deb-src http:// us.archive.ubuntu.com/ubuntu/ trusty-security main
deb-src http:// us.archive.ubuntu.com/ubuntu/ trusty-updates main

(http 构造函数后没有空格。我把空格放在那里是因为我无法发布链接。)

是否有一个我可以添加的免费 repo 的 URL?

答案1

你有主要的启用后,您需要添加宇宙repos,因为它不是核心维护包,搜索 ubuntu 包会显示哪些 repo 包来自http://packages.ubuntu.com/trusty/ruby-rest-client

将以下行添加到您的 apt sources.list,然后添加 apt-get update:

# Universe Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe

###### Ubuntu Update Repos Universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe

相关内容