问题描述
我如何更新单个软件包?至于man apt-get表示apt-get upgrade不会将软件包/软件包列表作为参数:
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.
最佳解决办法
你只需要做apt-get install --only-upgrade 。这将仅升级该单个软件包,并且仅在已安装时才升级。
如果您希望在不存在该软件包的情况下安装该软件包,或者如果该软件包进行了升级,则可以省略--only-upgrade。
次佳解决办法
为了使用CLI更新单个软件包: