當前位置: 首頁>>技術教程>>正文


如何啟用“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/zh-tw/article/1521.html,未經允許,請勿轉載。