我想将python3
Ubuntu 16.04 LTS 上的 (3.5.x) 升级到 Python 3.6。作为第一步,我apt-get remove
会python3
。我确信我破坏了我的 Ubuntu
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Removing apparmor (2.10.95-0ubuntu2.11) ...
Removing apport-gtk (2.20.1-0ubuntu2.21) ...
Removing apport (2.20.1-0ubuntu2.21) ...
Removing apt-xapian-index (0.47ubuntu8.4) ...
Removing index /var/lib/apt-xapian-index...
Removing ubuntu-desktop (1.361.4) ...
Removing language-selector-gnome (0.165.4) ...
Removing ubuntu-software (3.20.5-0ubuntu0.16.04.13) ...
Removing gnome-software (3.20.5-0ubuntu0.16.04.13) ...
Removing nautilus-share (0.7.3-2ubuntu1) ...
Removing apturl (0.5.2ubuntu11.2) ...
Removing apturl-common (0.5.2ubuntu11.2) ...
Removing checkbox-gui (1.2.4-0ubuntu1) ...
Removing checkbox-converged (1.2.4-0ubuntu1) ...
Removing checkbox-ng (0.23-2) ...
Removing command-not-found (0.3ubuntu16.04.2) ...
Removing unity (7.4.5+16.04.20190312-0ubuntu1) ...
Removing compiz (1:0.9.12.3+16.04.20180221-0ubuntu1) ...
Removing compiz-gnome (1:0.9.12.3+16.04.20180221-0ubuntu1) ...
Removing virtualbox-qt (5.1.38-dfsg-0ubuntu1.16.04.3) ...
Removing virtualbox (5.1.38-dfsg-0ubuntu1.16.04.3) ...
Removing unattended-upgrades (1.1ubuntu1.18.04.7~16.04.5) ...
Removing libpurple-bin (1:2.10.12-0ubuntu5.2) ...
Removing usb-creator-gtk (0.3.2ubuntu16.04.2) ...
Removing firefox (70.0.1+build1-0ubuntu0.16.04.1) ...
update-alternatives: using /usr/bin/chromium-browser to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
update-alternatives: using /usr/bin/chromium-browser to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
Removing foomatic-db-compressed-ppds (20160212-0ubuntu1) ...
Removing slack-desktop (3.3.7) ...
Removing libgnomevfs2-extra:amd64 (1:2.24.4-6.1ubuntu1) ...
Removing gedit (3.18.3-0ubuntu4) ...
Removing dh-python (2.20151103ubuntu1.2) ...
Removing update-notifier (3.168.10) ...
Removing update-notifier-common (3.168.10) ...
Removing update-manager (1:16.04.17) ...
Removing ubuntu-release-upgrader-gtk (1:16.04.29) ...
Removing update-manager-core (1:16.04.17) ...
...
有没有办法可以从中正常恢复而不丢失机器上的数据?
答案1
重新安装桌面应该可以让您大部分恢复到完全正常工作的系统:
sudo apt install ubuntu-desktop
完成后,查看日志中已删除的软件包列表/var/log/apt
,并安装您仍然需要的任何缺失的软件包。
(回答标题中的问题,是的,删除 Python 3 会破坏 Ubuntu 的很多功能。不要删除 Python 包。)