Apt
“apt-get upgrade sqlmap”正在升級所有包,而不僅僅是 sqlmap。這是預期的行為嗎?
我發出了以下命令,結合了雙與號,即“&&”。
apt-get update && apt-get upgrade sqlmap
顯然所有已安裝的軟體包都在升級。這不是我的本意。我只是想升級一個名為“sqlmap”的包。為什麼會有這種行為?
這是正確的行為。閱讀文件(
man apt-get
):upgrade upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list. Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version. An update must be performed first so that apt-get knows that new versions of packages are available.