問題描述
如何在支持的Ubuntu版本中訪問Universe Repository?
最佳解決方法
如果你想在一個命令中使用軟件源代碼,然後在終端中輸入:
sudo add-apt-repository universe
在舊版本的Ubuntu上,您可能需要使用完整的源代碼行:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
啟用所有Ubuntu軟件(main universe restricted multiverse
)存儲庫
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
你可以添加不同鏈接的partner
存儲庫(請參閱ubuntu的不同之處)
sudo add-apt-repository "deb http://archive.canonical.com/ubuntu $(lsb_release -sc) partner"
然後更新軟件包列表:
sudo apt-get update
附:
$(lsb_release -sc)
檢查您的Ubuntu版本並將其名稱放在源代碼鏈接中。由於12.04被稱為precise
,因此您可以在lsb_release -sc
給出precise
的終端進行測試。這在軟件源中添加了Ubuntu發行版的確切名稱。錯誤的詞,沒有任何工作。
對於存儲庫中的所有差異,請閱讀https://help.ubuntu.com/community/Repositories/Ubuntu
次佳解決方法
首先,打開軟件中心。點擊’edit’,然後點擊’software sources’打開軟件源窗口。一旦打開,請選中“Community-maintained free”和“open-source”軟件(Universe)。“
現在,所有的Universe包都應該像軟件中心一樣出現在軟件中心。
更多信息:
第三種解決方法
命令行啟用Ubuntu軟件存儲庫的方式12.10及以上版本:
要啟用主存儲庫,
sudo add-apt-repository main
要啟用Universe存儲庫,
sudo add-apt-repository universe
要啟用多重配置庫,
sudo add-apt-repository multiverse
要啟用受限存儲庫,
sudo add-apt-repository restricted
注意:
啟用存儲庫後,不要忘記更新它。運行以下命令更新存儲庫,
sudo apt-get update
第四種方法
打開破折號並鍵入Software sources
然後打開軟件源並單擊Universe資源庫。
關閉並重新加載緩存