apt-get update
每次安装新包以及安装损坏的包后是否都需要该命令?
由于我是这个操作系统的新手,我必须搜索命令来查找软件包,并且每个解决方案都包含此部分。为什么这么有必要?
答案1
当您在文件或文件夹中添加、删除或更改条目时apt-get update
,您需要该命令。sudo apt-get update
/etc/apt/sources.list
/etc/apt/sources.list.d/
从man apt-get
:
update
update is used to resynchronize the package index files from their sources.
The indexes of available packages are fetched from the location(s) specified in
/etc/apt/sources.list. For example, when using a Debian archive, this command
retrieves and scans the Packages.gz files, so that information about new and
updated packages is available. An update should always be performed before an
upgrade or dist-upgrade. Please be aware that the overall progress meter will
be incorrect as the size of the package files cannot be known in advance.
我引用一下@汤姆
定期运行
apt-get update
并apt-get upgrade
获取错误修复等。