检查更新时出现问题?

检查更新时出现问题?

我尝试使用终端中的此命令卸载 Ubuntu 20.04 中的系统的 python 3.8。

列出默认位置中的所有 Python 版本

ls /usr/bin/python*

仅删除 python3 包 sudo apt-get 删除 python3.8

加上它的依赖包

sudo apt-get remove --自动删除 python3.8

加上 python3 的配置和/或数据文件

sudo apt-get purge python3.8

python3.5 及其依赖项的配置和/或数据文件

sudo apt-get purge --自动删除 python3.5 ), 我在 Github 中得到这个命令,它删除了包括终端在内的许多应用程序,我在这个操作系统中安装了 python 3.7.7。我有什么办法可以解决它吗?

答案1

Python 3.8 是操作系统的一部分,许多工具都依赖于它。
当您从系统中删除 Python 时,您也会删除这些工具。
如果您使用的是桌面版和我认为你会,您将无法启动到桌面,但系统应该启动到 CLI 模式。登录并从中
删除您安装的 Python 版本/usr/local/lib//usr/local/bin/

确保您的网络已启动。

ip -br add

它应该返回有关接口及其状态的信息。由于诸如此类的网络工具网络计划网络管理器依赖于 python,它们也会被删除。
启用端口:

sudo ip link set dev {port label} up

如果你有 dhcp 服务器:

sudo dhclient

如果您使用静态 IP:

sudo ip addr add {IP address}/{mask in CIDR} dev {port label} 
sudo ip route default via {gateway IP}
sudo systemd-resolve --set-dns=8.8.8.8 --interface={port label}

如果您输入了正确的信息,您应该可以访问互联网。
现在让我们重新安装您的命令将删除的所有软件包:

sudo apt-get update && sudo apt-get install -y\
  apg apparmor apport apport-gtk apport-symptoms aptdaemon aptdaemon-data apturl apturl-common avahi-utils command-not-found cups-pk-helper dc deja-dup distro-info-data docbook-xml duplicity firefox foomatic-db-compressed-ppds fprintd gdb gdbserver gdm3\
  gedit gedit-common gir1.2-accountsservice-1.0 gir1.2-atspi-2.0 gir1.2-dbusmenu-glib-0.4 gir1.2-dee-1.0 gir1.2-gck-1 gir1.2-gcr-3 gir1.2-gdm-1.0 gir1.2-geoclue-2.0 gir1.2-gnomebluetooth-1.0 gir1.2-goa-1.0 gir1.2-graphene-1.0 gir1.2-gst-plugins-base-1.0\
  gir1.2-gstreamer-1.0 gir1.2-gtksource-4 gir1.2-gudev-1.0 gir1.2-gweather-3.0 gir1.2-ibus-1.0 gir1.2-javascriptcoregtk-4.0 gir1.2-json-1.0 gir1.2-mutter-6 gir1.2-nm-1.0 gir1.2-nma-1.0 gir1.2-notify-0.7 gir1.2-packagekitglib-1.0 gir1.2-polkit-1.0\
  gir1.2-rb-3.0 gir1.2-rsvg-2.0 gir1.2-secret-1 gir1.2-snapd-1 gir1.2-soup-2.4 gir1.2-totem-1.0 gir1.2-totemplparser-1.0 gir1.2-udisks-2.0 gir1.2-unity-5.0 gir1.2-upowerglib-1.0 gir1.2-vte-2.91 gir1.2-webkit2-4.0 gir1.2-wnck-3.0 gkbd-capplet\
  gnome-control-center gnome-control-center-faces gnome-getting-started-docs gnome-menus gnome-online-accounts gnome-session-bin gnome-session-common gnome-shell gnome-shell-common gnome-shell-extension-appindicator gnome-shell-extension-desktop-icons\
  gnome-shell-extension-ubuntu-dock gnome-startup-applications gnome-terminal gnome-terminal-data gnome-user-docs gvfs-backends hplip hplip-data ibus ibus-data ibus-table ippusbxd language-selector-common language-selector-gnome libamtk-5-0\
  libamtk-5-common libbabeltrace1 libc6-dbg libcc1-0 libcdio-cdda2 libcdio-paranoia2 libcdio18 libcolord-gtk1 libdmapsharing-3.0-2 libdw1 libfprint-2-2 libglu1-mesa libgnomekbd-common libgnomekbd8 libgpod-common libgpod4 libgsound0 libgssdp-1.2-0\
  libgupnp-1.2-0 libgupnp-av-1.0-2 libgupnp-dlna-2.0-3 libhpmud0 libimagequant0 libldb2 liblirc-client0 libmspack0 libmtp-common libmtp-runtime libmtp9 libmutter-6-0 libnetplan0 libnfs13 libpam-fprintd libpython3-stdlib librsync2 librygel-core-2.6-2\
  librygel-db-2.6-2 librygel-renderer-2.6-2 librygel-server-2.6-2 libsane-hpaio libsgutils2-2 libsmbclient libtalloc2 libtepl-4-0 libtevent0 libwbclient0 libwhoopsie-preferences0 libwnck-3-0 libwnck-3-common libxatracker2 libxcb-icccm4 libxcb-image0\
  libxcb-keysyms1 libxcb-render-util0 libxcb-res0 libxcb-xkb1 libxcb-xv0 libxfont2 libxkbcommon-x11-0 libxklavier16 libxmlsec1-openssl libxres1 libxss1 libxvmc1 libyelp0 lsb-release mobile-broadband-provider-info mscompress mutter mutter-common\
  nautilus-extension-gnome-terminal nautilus-share netplan.io network-manager-gnome networkd-dispatcher openprinting-ppds orca plymouth-label plymouth-theme-spinner plymouth-theme-ubuntu-text printer-driver-foo2zjs\
  printer-driver-foo2zjs-common printer-driver-hpcups printer-driver-m2300w printer-driver-postscript-hp printer-driver-ptouch printer-driver-pxljr printer-driver-sag-gdi python-apt-common python3 python3-apport python3-apt python3-aptdaemon\
  python3-aptdaemon.gtk3widgets python3-bcrypt python3-blinker python3-brlapi python3-cairo python3-certifi python3-cffi-backend python3-chardet python3-click python3-colorama python3-commandnotfound python3-cryptography python3-cups python3-cupshelpers\
  python3-dateutil python3-dbus python3-debconf python3-debian python3-defer python3-distro python3-distro-info python3-distupgrade python3-entrypoints python3-fasteners python3-future python3-gdbm python3-gi python3-gi-cairo python3-httplib2\
  python3-ibus-1.0 python3-idna python3-jwt python3-keyring python3-launchpadlib python3-lazr.restfulclient python3-lazr.uri python3-lib2to3 python3-lockfile python3-louis python3-macaroonbakery python3-mako python3-markupsafe python3-minimal\
  python3-monotonic python3-nacl python3-netifaces python3-oauthlib python3-olefile python3-paramiko python3-pexpect python3-pil python3-pkg-resources python3-problem-report python3-protobuf python3-ptyprocess python3-pyatspi python3-pymacaroons\
  python3-renderpm python3-reportlab python3-reportlab-accel python3-requests python3-requests-unixsocket python3-rfc3339 python3-secretstorage python3-simplejson python3-six python3-software-properties python3-speechd python3-systemd python3-talloc\
  python3-tz python3-uno python3-update-manager python3-urllib3 python3-wadllib python3-xdg python3-xkit python3-yaml python3.8 python3.8-minimal rhythmbox-plugin-alternative-toolbar rhythmbox-plugins rygel samba-libs sgml-base sgml-data snapd\
  software-properties-common software-properties-gtk ssh-import-id switcheroo-control syslinux syslinux-common syslinux-legacy system-config-printer system-config-printer-common system-config-printer-udev totem-plugins ubuntu-advantage-tools\
  ubuntu-desktop ubuntu-desktop-minimal ubuntu-docs ubuntu-drivers-common ubuntu-minimal ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk ubuntu-session ubuntu-standard ufw unattended-upgrades update-manager update-manager-core update-notifier\
  update-notifier-common usb-creator-common usb-creator-gtk whoopsie-preferences x11-apps x11-session-utils x11-xkb-utils xbitmaps xbrlapi xfonts-base xfonts-encodings xfonts-scalable xfonts-utils xinit xinput xml-core xorg xserver-common xserver-xephyr\
  xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-libinput xserver-xorg-input-wacom xserver-xorg-legacy xserver-xorg-video-all xserver-xorg-video-amdgpu xserver-xorg-video-ati xserver-xorg-video-fbdev xserver-xorg-video-intel\
  xserver-xorg-video-nouveau xserver-xorg-video-qxl xserver-xorg-video-radeon xserver-xorg-video-vesa xwayland yelp yelp-xsl

相关内容