apt-get software-properties-common 不正确地安装 cron

apt-get software-properties-common 不正确地安装 cron

问题:
“apt-get install software-properties-common”无法正确安装 cron。
在安装过程中,cron 软件包似乎未安装。
但是,安装后,dpkg 会将 cron 的状态打印为未知且未安装。
此外,安装需要 cron 作为其依赖项的其他软件包(例如 logrotate)会跳过 cron 的安装。需要显式安装 cron 才能解决此问题。


问题
:这是软件属性通用包的问题吗?


环境:

  • Windows 10 机器
  • Ubuntu 20.04 Docker 映像


命令

  1. dpkg-l cron
dpkg-query: no packages found matching cron
  1. apt-get 更新 && apt-get 安装软件属性通用 [TL;DR]
The following additional packages will be installed:
  ca-certificates dbus dbus-user-session dconf-gsettings-backend dconf-service dirmngr distro-info-data dmsetup file
  gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 glib-networking glib-networking-common glib-networking-services gnupg
  gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gsettings-desktop-schemas iso-codes
  krb5-locales libapparmor1 libappstream4 libargon2-1 libasn1-8-heimdal libassuan0 libbrotli1 libcap2 libcap2-bin
  libcryptsetup12 libdbus-1-3 libdconf1 libdevmapper1.02.1 libelf1 libexpat1 libgirepository-1.0-1 libglib2.0-0
  libglib2.0-bin libglib2.0-data libgssapi-krb5-2 libgssapi3-heimdal libgstreamer1.0-0 libhcrypto4-heimdal
  libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libicu66 libip4tc2 libjson-c4 libk5crypto3 libkeyutils1
  libkmod2 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libksba8 libldap-2.4-2 libldap-common liblmdb0 libmagic-mgc
  libmagic1 libmpdec2 libnpth0 libnss-systemd libpackagekit-glib2-18 libpam-cap libpam-systemd libpolkit-agent-1-0
  libpolkit-gobject-1-0 libproxy1v5 libpsl5 libpython3-stdlib libpython3.8-minimal libpython3.8-stdlib libreadline8
  libroken18-heimdal libsasl2-2 libsasl2-modules libsasl2-modules-db libsoup2.4-1 libsqlite3-0 libssl1.1 libstemmer0d
  libwind0-heimdal libxml2 libyaml-0-2 lsb-release mime-support networkd-dispatcher openssl packagekit
  packagekit-tools pinentry-curses policykit-1 publicsuffix python-apt-common python3 python3-apt python3-certifi
  python3-chardet python3-dbus python3-distro-info python3-gi python3-idna python3-minimal python3-pkg-resources
  python3-requests python3-requests-unixsocket python3-six python3-software-properties python3-urllib3 python3.8
  python3.8-minimal readline-common shared-mime-info systemd systemd-sysv systemd-timesyncd ucf unattended-upgrades
  xdg-user-dirs xz-utils
Suggested packages:
  pinentry-gnome3 tor parcimonie xloadimage scdaemon isoquery krb5-doc krb5-user gstreamer1.0-tools
  libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp
  libsasl2-modules-sql iw | wireless-tools appstream pinentry-doc python3-doc python3-tk python3-venv python3-apt-dbg
  python-apt-doc python-dbus-doc python3-dbus-dbg python3-setuptools python3-cryptography python3-openssl
  python3-socks python3.8-venv python3.8-doc binutils binfmt-support readline-doc systemd-container bsd-mailx
  default-mta | mail-transport-agent needrestart powermgmt-base
The following NEW packages will be installed:
  ca-certificates dbus dbus-user-session dconf-gsettings-backend dconf-service dirmngr distro-info-data dmsetup file
  gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 glib-networking glib-networking-common glib-networking-services gnupg
  gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gsettings-desktop-schemas iso-codes
  krb5-locales libapparmor1 libappstream4 libargon2-1 libasn1-8-heimdal libassuan0 libbrotli1 libcap2 libcap2-bin
  libcryptsetup12 libdbus-1-3 libdconf1 libdevmapper1.02.1 libelf1 libexpat1 libgirepository-1.0-1 libglib2.0-0
  libglib2.0-bin libglib2.0-data libgssapi-krb5-2 libgssapi3-heimdal libgstreamer1.0-0 libhcrypto4-heimdal
  libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libicu66 libip4tc2 libjson-c4 libk5crypto3 libkeyutils1
  libkmod2 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libksba8 libldap-2.4-2 libldap-common liblmdb0 libmagic-mgc
  libmagic1 libmpdec2 libnpth0 libnss-systemd libpackagekit-glib2-18 libpam-cap libpam-systemd libpolkit-agent-1-0
  libpolkit-gobject-1-0 libproxy1v5 libpsl5 libpython3-stdlib libpython3.8-minimal libpython3.8-stdlib libreadline8
  libroken18-heimdal libsasl2-2 libsasl2-modules libsasl2-modules-db libsoup2.4-1 libsqlite3-0 libssl1.1 libstemmer0d
  libwind0-heimdal libxml2 libyaml-0-2 lsb-release mime-support networkd-dispatcher openssl packagekit
  packagekit-tools pinentry-curses policykit-1 publicsuffix python-apt-common python3 python3-apt python3-certifi
  python3-chardet python3-dbus python3-distro-info python3-gi python3-idna python3-minimal python3-pkg-resources
  python3-requests python3-requests-unixsocket python3-six python3-software-properties python3-urllib3 python3.8
  python3.8-minimal readline-common shared-mime-info software-properties-common systemd systemd-sysv systemd-timesyncd
  ucf unattended-upgrades xdg-user-dirs xz-utils
0 upgraded, 128 newly installed, 0 to remove and 0 not upgraded.

3-1. dpkg -l

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version                    Architecture Description
+++-=============================-==========================-============-==============================================
=================================
ii  adduser                       3.118ubuntu2               all          add and remove users and groups
ii  apt                           2.0.4                      amd64        commandline package manager
ii  base-files                    11ubuntu5.3                amd64        Debian base system miscellaneous files
ii  base-passwd                   3.5.47                     amd64        Debian base system master password and group f
iles
ii  bash                          5.0-6ubuntu1.1             amd64        GNU Bourne Again SHell
ii  bsdutils                      1:2.34-0.1ubuntu9.1        amd64        basic utilities from 4.4BSD-Lite
ii  bzip2                         1.0.8-2                    amd64        high-quality block-sorting file compressor - u
tilities
ii  ca-certificates               20210119~20.04.1           all          Common CA certificates
ii  coreutils                     8.30-3ubuntu2              amd64        GNU core utilities
ii  dash                          0.5.10.2-6                 amd64        POSIX-compliant shell

3-2. dpkg -l cron

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  cron           <none>       <none>       (no description available)
  1. apt-get 更新 && apt-get 安装 cron
Suggested packages:
  anacron logrotate checksecurity default-mta | mail-transport-agent
The following NEW packages will be installed:
  cron
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  1. dpkg-l cron
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version           Architecture Description
+++-==============-=================-============-=================================
ii  cron           3.0pl1-136ubuntu1 amd64        process scheduling daemon


尝试过的解决方案:
“dpkg --forget-old-unavail”、“dpkg --clear-avail”、“apt-get autoremove”、“apt-get upgrade”都没有帮助。

相关内容