簡體   English   中英

“ dnf安裝 <package name> ”開始直接下載fedora x86-64。 如何避免這種情況

[英]“ dnf install <package name> ” starts direct download of fedora x86-64. How to avoid this

我安裝了Fedora 25。

每當我運行dnf install < package name >特別是Nodejs時,它就會自動開始下載Fedora x86-64和Fedora x86-64更新。

到底是什么情況?

由於數據資源有限,如何避免這種情況。

先感謝您。

它不會下載更新,但會下載menadata(如果一段時間未更新)。

需要元數據(最新版本的軟件包列表)才能知道要下載的軟件包版本。 如果它不下載此元數據,則可能最終會安裝具有各種錯誤或安全問題的舊版本(最壞的情況)。

到底是什么情況?

這稱為元數據同步 當本地dnf元數據過期時,dnf會嘗試從遠程存儲庫下載最新的元數據。 此過程需要一些時間,並且會占用帶寬。

由於數據資源有限,我如何才能避免這種情況。

您可以使用--cacheonly運行dnf install ,但是在這種情況下,您可能無法獲得最新的軟件包版本。 參見文檔

-C, --cacheonly

    Run entirely from system cache, don’t update the cache and use it even in case it is expired.

    DNF uses a separate cache for each user under which it executes. The cache for the root user is called the system cache. This switch allows a regular user read-only access to the system cache which usually is more fresh than the user’s and thus he does not have to wait for metadata sync.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM