"apt-get Upgrade sqlmap"은 sqlmap뿐만 아니라 모든 패키지를 업그레이드합니다. 이것이 예상되는 동작입니까?

"apt-get Upgrade sqlmap"은 sqlmap뿐만 아니라 모든 패키지를 업그레이드합니다. 이것이 예상되는 동작입니까?

이중 앰퍼샌드(예: "&&")와 결합하여 다음 명령을 실행했습니다.

apt-get update && apt-get upgrade sqlmap

분명히 설치된 모든 패키지가 업그레이드되고 있습니다. 이것은 내 의도가 아닙니다. "sqlmap"이라는 패키지를 업그레이드하고 싶습니다. 왜 이런 문제가 발생합니까?

답변1

이는 올바른 동작입니다. 설명서 읽기( 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.

답변2

다음 줄을 사용하여 하나의 패키지만 업데이트해야 합니다.

apt-get install --only-upgrade <packagename>

존재하다 <packagename> sqlmap.

답변3

패키지만 업그레이드하려면 다음 명령을 다음 &&으로 변경하세요.

apt-get install sqlmap

를 사용하면 apt-get upgrade업그레이드할 수 있는 모든 패키지를 업그레이드하려고 시도합니다.

관련 정보