当前位置: 首页>>技术教程>>正文


如何启用“multiverse”存储库?

, , ,

问题描述

我一直看到地方引用”multiverse”存储库作为我可以获得软件的地方,我该如何启用此存储库?请通过命令行以图形方式指定如何执行此操作。

最佳解决方法

Multiverse存储库包含”not free”的软件包(软件),涉及许可限制。

The Multiverse repository contains software which has been classified as non-free. This software may not be permitted in some jurisdictions. When installing each package from this repository, you should verify that the laws of your country permit you to use it. Also, this software may not include security updates.

有关ubuntu存储库的原理的其他信息,请参阅Overview of the default Ubuntu software repositories

您可以从命令行或以图形方式启用存储库。

Graphically

打开软件中心,导航到顶部的”Ubuntu software”选项卡,选择(勾选)多元宇宙。

package-management,software-center,software-sources,ubuntu

使用”Reload”按钮更新包列表。

package-management,software-center,software-sources,ubuntu

命令行

使用任何编辑器打开/etc/apt/sources.list

# command line editor (nano)
sudo -e /etc/apt/sources.list

# graphical editor
gksu gedit /etc/apt/sources.list

取消注释(从前面删除#)multiverse行或在需要时添加它们,因此行看起来像这样:

## 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/ oneiric multiverse
#deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric multiverse
deb http://us.archive.ubuntu.com/ubuntu/ oneiric-updates multiverse
#deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric-updates multiverse

如果需要下载源代码,请取消注释deb-src行(大多数用户不需要源代码,因此如果有疑问,请将其禁用)。

保存您的编辑(如果您使用nano,Ctrl + X,然后键入Y以保存更改)然后,更新您的包列表,运行

sudo apt-get update

次佳解决方法

新版本的Ubuntu可用的另一个选项:

sudo apt-add-repository multiverse && sudo apt-get update

从手册页:

Examples:
  apt-add-repository 'deb http://myserver/path/to/repo stable myrepo'
  apt-add-repository 'http://myserver/path/to/repo myrepo'
  apt-add-repository 'https://packages.medibuntu.org free non-free'
  apt-add-repository http://extras.ubuntu.com/ubuntu
  apt-add-repository ppa:user/repository
  apt-add-repository multiverse

第三种解决方法

从命令行不使用文本编辑器或GUI:

sudo sed -i "/^# deb.*multiverse/ s/^# //" /etc/apt/sources.list

http://alestic.com/2012/05/aws-命令行-packages

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/1521.html,未经允许,请勿转载。