Eu queria atualizar minhas versões do python e, quando a atualização via apt não fez nada, decidi que queria criar as versões mais recentes do Python 2 (2.7.16) e 3 (3.7.2). Antes de fazer isso, no entanto, infelizmente decidi remover ambas as versões que eu tinha (2.7.15~rc1-1, 3.6.7), então basicamente destruí meu sistema. Eu poderia construir e instalar as novas versões muito bem, mas quando reiniciei, a GUI não estava carregando. O gerenciador de inicialização ainda está funcionando e posso acessar o terminal. Mas ao tentar seguir alguns conselhos aqui (como instalar o ubuntu-desktop), descobri que não consigo me conectar à internet (os nomes de host não podem ser resolvidos quando tento instalar pacotes e não consigo fazer ping www. google. com). Tentei usar o modo de recuperação onde habilitei a rede, mas não houve diferença.
Existe alguma chance de eu reparar meu sistema? Ou existe alguma maneira de usar um stick USB de instalação do Ubuntu para redefinir o sistema para as "configurações de fábrica" (mesmas partições etc. de antes), mesmo que eu tenha que excluir tudo lá? Estou executando o Windows 10 e o Ubuntu 18.04 em inicialização dupla e, embora o processo de instalação tenha ocorrido sem problemas na primeira vez, tive problemas antes com a inicialização dupla do Windows e do Ubuntu no meu laptop e agora estou com medo de causar ainda mais danos. Ficaria muito feliz se alguém pudesse me ajudar.
Editar # 1: Parece que ainda python3.6-minimal
instalei, apt list --installed | grep 'python'
saídas:
libpython-stdlib/bionic,now 2.7.15~rc1-1 amd64 [installed,auto-removable]
libpython2.7/bionic-updates,bionic-security,now 2.7.15~rc1-1ubuntu0.1 amd64 [installed]
libpython2.7-minimal/bionic-updates,bionic-security,now 2.7.15~rc1-1ubuntu0.1 amd64 [installed]
libpython2.7-stdlib/bionic-updates,bionic-security,now 2.7.15~rc1-1ubuntu0.1 amd64 [installed]
libpython3-stdlib/bionic-updates,now 3.6.7-1~18.04 amd64 [installed]
libpython3.6/bionic-updates,now 3.6.7-1~18.04 amd64 [installed]
libpython3.6-minimal/bionic-updates,now 3.6.7-1~18.04 amd64 [installed]
libpython3.6-stdlib/bionic-updates,now 3.6.7-1~18.04 amd64 [installed]
python-apt-common/bionic-updates,bionic-updates,now 1.6.3ubuntu1 all [installed]
python-minimal/bionic,now 2.7.15~rc1-1 amd64 [installed,auto-removable]
python-talloc/bionic,now 2.1.10-2ubuntu1 amd64 [installed]
python2.7/bionic-updates,bionic-security,now 2.7.15~rc1-1ubuntu0.1 amd64 [installed]
python2.7-minimal/bionic-updates,bionic-security,now 2.7.15~rc1-1ubuntu0.1 amd64 [installed,automatic]
python3-minimal/bionic-updates,now 3.6.7-1~18.04 amd64 [installed]
python3.6/bionic-updates,now 3.6.7-1~18.04 amd64 [installed]
python3.6-minimal/bionic-updates,now 3.6.7-1~18.04 amd64 [installed]
Também ls /var/cache/apt/archive | grep 'python'
me dá:
python3-apt_1.6.3ubuntu1_amd64.deb
python3-distupgrade_1%3a18.04.30_all.deb
python3-gi_3.26.1-2ubuntu1_amd64.deb
python3-gi-cairo_3.26.1-2ubuntu1_amd64.deb
python3-update-manager_1%3a18.04.11.9_all.deb
python-apt-common_1.6.3ubuntu1_all.deb
Eu espero que isso ajude.
Edit#2: Log de sessão de /var/log/apt/term.log
:
Log started: 2019-03-13 23:31:26
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 180782 files and directories currently installed.)
Removing gnome-software-plugin-snap (3.28.1-0ubuntu4.18.04.8) ...
Removing snapd (2.37.1.1+18.04) ...
Removing apparmor (2.12-4ubuntu5.1) ...
Removing apport-gtk (2.20.9-0ubuntu7.5) ...
Removing apport (2.20.9-0ubuntu7.5) ...
Removing ubuntu-desktop (1.417) ...
Removing gnome-control-center (1:3.28.2-0ubuntu0.18.04.2) ...
Removing language-selector-gnome (0.188.1) ...
Removing nautilus-share (0.7.3-2ubuntu3) ...
Removing apturl (0.5.2ubuntu14.2) ...
Removing apturl-common (0.5.2ubuntu14.2) ...
Removing command-not-found (18.04.5) ...
Removing firefox (65.0.1+build2-0ubuntu0.18.04.1) ...
Removing foomatic-db-compressed-ppds (20180306-1) ...
Removing gdm3 (3.28.3-0ubuntu18.04.4) ...
Removing gedit (3.28.1-1ubuntu1.1) ...
Removing gedit-common (3.28.1-1ubuntu1.1) ...
Removing ubuntu-session (3.28.1-0ubuntu3) ...
Removing update-notifier (3.192.1.5) ...
Removing update-manager (1:18.04.11.9) ...
Removing ubuntu-release-upgrader-gtk (1:18.04.30) ...
[1mdpkg:[0m aptdaemon: dependency problems, but removing anyway as you requested:
python3-aptdaemon depends on aptdaemon.
Removing aptdaemon (1.1.1+bzr982-0ubuntu19) ...
[1mdpkg:[0m python3-aptdaemon: dependency problems, but removing anyway as you requested:
python3-aptdaemon.gtk3widgets depends on python3-aptdaemon (= 1.1.1+bzr982-0ubuntu19).
Removing python3-aptdaemon (1.1.1+bzr982-0ubuntu19) ...
Selecting previously unselected package policykit-1-gnome.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 178575 files and directories currently installed.)
Preparing to unpack .../policykit-1-gnome_0.105-6ubuntu2_amd64.deb ...
Unpacking policykit-1-gnome (0.105-6ubuntu2) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 178584 files and directories currently installed.)
Removing ibus-table (1.9.14-3) ...
Removing ibus (1.5.17-3ubuntu4) ...
Removing gnome-menus (3.13.3-11ubuntu1.1) ...
Removing gnome-online-accounts (3.28.0-0ubuntu2.1) ...
Removing ubuntu-software (3.28.1-0ubuntu4.18.04.8) ...
Removing gnome-software (3.28.1-0ubuntu4.18.04.8) ...
Removing nautilus-extension-gnome-terminal (3.28.2-1ubuntu1~18.04.1) ...
Removing xorg (1:7.7+19ubuntu7.1) ...
Removing gnome-terminal (3.28.2-1ubuntu1~18.04.1) ...
Removing printer-driver-postscript-hp (3.17.10+repack0-5) ...
Removing hplip (3.17.10+repack0-5) ...
Removing hplip-data (3.17.10+repack0-5) ...
[1mdpkg:[0m [1;33mwarning:[0m while removing hplip-data, directory '/usr/share/hplip/ui5' not empty so not removed
[1mdpkg:[0m [1;33mwarning:[0m while removing hplip-data, directory '/usr/share/hplip/scan' not empty so not removed
[1mdpkg:[0m [1;33mwarning:[0m while removing hplip-data, directory '/usr/share/hplip/prnt' not empty so not removed
[1mdpkg:[0m [1;33mwarning:[0m while removing hplip-data, directory '/usr/share/hplip/pcard' not empty so not removed
[1mdpkg:[0m [1;33mwarning:[0m while removing hplip-data, directory '/usr/share/hplip/installer' not empty so not removed
[1mdpkg:[0m [1;33mwarning:[0m while removing hplip-data, directory '/usr/share/hplip/fax' not empty so not removed
[1mdpkg:[0m [1;33mwarning:[0m while removing hplip-data, directory '/usr/share/hplip/copier' not empty so not removed
[1mdpkg:[0m [1;33mwarning:[0m while removing hplip-data, directory '/usr/share/hplip/base/pexpect' not empty so not removed
Removing ubuntu-standard (1.417) ...
Removing language-selector-common (0.188.1) ...
Removing xserver-xorg (1:7.7+19ubuntu7.1) ...
Removing python3-apport (2.20.9-0ubuntu7.5) ...
Removing update-notifier-common (3.192.1.5) ...
Removing update-manager-core (1:18.04.11.9) ...
[1mdpkg:[0m [1;33mwarning:[0m while removing update-manager-core, directory '/var/lib/update-manager' not empty so not removed
Removing ubuntu-minimal (1.417) ...
Removing nplan (0.40.1~18.04.4) ...
Removing netplan.io (0.40.1~18.04.4) ...
[1mdpkg:[0m [1;33mwarning:[0m while removing netplan.io, directory '/etc/netplan' not empty so not removed
Removing networkd-dispatcher (1.7-0ubuntu3.3) ...
Removing openprinting-ppds (20180306-1) ...
Removing orca (3.28.0-3ubuntu1) ...
Removing plymouth-theme-ubuntu-text (0.9.3-1ubuntu7.18.04.1) ...
update-initramfs: deferring update (trigger activated)
Removing printer-driver-foo2zjs (20170320dfsg0-4) ...
Removing printer-driver-foo2zjs-common (20170320dfsg0-4) ...
Removing printer-driver-m2300w (0.51-13) ...
Removing printer-driver-ptouch (1.4.2-3) ...
Removing printer-driver-pxljr (1.4+repack0-5) ...
Removing unattended-upgrades (1.1ubuntu1.18.04.9) ...
Removing python3-problem-report (2.20.9-0ubuntu7.5) ...
Removing ubuntu-web-launchers (18.04.6) ...
Removing ubuntu-release-upgrader-core (1:18.04.30) ...
Removing software-properties-gtk (0.96.24.32.7) ...
Removing ubuntu-drivers-common (1:0.5.2.2) ...
Removing python3-aptdaemon.gtk3widgets (1.1.1+bzr982-0ubuntu19) ...
Removing python3-launchpadlib (1.10.6-1) ...
Removing python3-keyring (10.6.0-1) ...
Removing python3-secretstorage (2.3.1-2) ...
Removing python3-cryptography (2.1.4-1ubuntu1.2) ...
Removing python3-asn1crypto (0.24.0-1) ...
Removing python3-brlapi (5.5-4ubuntu2.0.1) ...
Removing python3-gi-cairo (3.26.1-2ubuntu1) ...
Removing system-config-printer (1.5.11-1ubuntu2) ...
Removing system-config-printer-common (1.5.11-1ubuntu2) ...
Removing python3-cairo:amd64 (1.16.2-1) ...
Removing python3-macaroonbakery (1.1.3-1) ...
Removing python3-requests-unixsocket (0.1.5-3) ...
Removing python3-pymacaroons (0.13.0-1) ...
Removing python3-nacl (1.1.2-1build1) ...
Removing python3-cffi-backend (1.11.5-1) ...
Removing usb-creator-gtk (0.3.5) ...
Removing usb-creator-common (0.3.5) ...
Removing python3-debian (0.1.32) ...
Removing python3-commandnotfound (18.04.5) ...
Removing python3-keyrings.alt (3.0-1) ...
Removing python3-crypto (2.6.1-8ubuntu2) ...
Removing system-config-printer-udev (1.5.11-1ubuntu2) ...
Removing python3-cupshelpers (1.5.11-1ubuntu2) ...
Removing software-properties-common (0.96.24.32.7) ...
Removing python3-debconf (1.5.66) ...
Removing python3-defer (1.0.6-2build1) ...
Removing python3-distro-info (0.18) ...
Removing python3-gdbm:amd64 (3.6.7-1~18.04) ...
Removing totem-plugins (3.26.0-0ubuntu6.2) ...
Removing python3-lazr.restfulclient (0.13.5-1) ...
Removing python3-httplib2 (0.9.2+dfsg-1) ...
Removing python3-wadllib (1.3.2-3ubuntu0.18.04.1) ...
Removing python3-lazr.uri (1.0.3-2build1) ...
Removing python3-louis (3.5.0-1ubuntu0.3) ...
Removing rhythmbox-plugins (3.4.2-4ubuntu1) ...
Removing python3-mako (1.0.7+ds1-1) ...
Removing python3-markupsafe (1.0-1build1) ...
Removing python3-netifaces (0.10.4-0.1build4) ...
Removing python3-oauth (1.0.1-5) ...
Removing python3-olefile (0.45.1-1) ...
Removing python3-pexpect (4.2.1-1) ...
Removing python3-reportlab (3.4.0-3build1) ...
Removing python3-pil:amd64 (5.1.0-1) ...
Removing python3-zope.interface (4.3.2-1build2) ...
Removing python3-protobuf (3.0.0-9.1ubuntu1) ...
Removing python3-ptyprocess (0.5.2-1) ...
Removing python3-pyatspi (2.26.0+dfsg-1) ...
Removing python3-renderpm:amd64 (3.4.0-3build1) ...
Removing python3-reportlab-accel:amd64 (3.4.0-3build1) ...
Removing python3-rfc3339 (1.0-4) ...
Removing python3-simplejson (3.13.2-1) ...
Removing python3-software-properties (0.96.24.32.7) ...
Removing python3-speechd (0.8.8-1ubuntu1) ...
Removing python3-systemd (234-1build1) ...
Removing python3-tz (2018.3-2) ...
Removing python3-uno (1:6.0.7-0ubuntu0.18.04.2) ...
Removing python3-xdg (0.25-4ubuntu1) ...
Removing python3-xkit (0.5.0ubuntu2) ...
Removing python3-yaml (3.12-1build2) ...
Removing rhythmbox-plugin-alternative-toolbar (0.18.0-1) ...
Removing ubuntu-system-service (0.3.1) ...
Removing ufw (0.35-5) ...
Skip stopping firewall: ufw (not enabled)
Removing python3-requests (2.18.4-2ubuntu0.1) ...
Removing python3-certifi (2018.1.18-2) ...
Removing python3-chardet (3.0.4-1) ...
Removing python3-cups (1.9.73-2) ...
Removing python3-dbus (1.2.6-1) ...
Removing python3-gi (3.26.1-2ubuntu1) ...
Removing python3-idna (2.6-1) ...
Removing python3-pkg-resources (39.0.1-2) ...
Removing python3-urllib3 (1.22-1) ...
Removing python3-six (1.11.0-2) ...
Removing python3-distupgrade (1:18.04.30) ...
Removing python3-update-manager (1:18.04.11.9) ...
Removing lsb-release (9.20170808ubuntu1) ...
Removing python3-apt (1.6.3ubuntu1) ...
[1mdpkg:[0m gir1.2-ibus-1.0:amd64: dependency problems, but removing anyway as you requested:
gnome-shell depends on gir1.2-ibus-1.0 (>= 1.5.2); however:
Package gir1.2-ibus-1.0:amd64 is to be removed.
Removing gir1.2-ibus-1.0:amd64 (1.5.17-3ubuntu4) ...
[1mdpkg:[0m python3: dependency problems, but removing anyway as you requested:
gnome-shell depends on python3; however:
Package python3 is to be removed.
Removing python3 (3.6.7-1~18.04) ...
[1mdpkg:[0m gnome-shell: dependency problems, but removing anyway as you requested:
network-manager-gnome depends on policykit-1-gnome | polkit-1-auth-agent; however:
Package policykit-1-gnome is not configured yet.
Package polkit-1-auth-agent is not installed.
Package policykit-1-gnome which provides polkit-1-auth-agent is not configured yet.
Package gnome-shell which provides polkit-1-auth-agent is to be removed.
Removing gnome-shell (3.28.3-0ubuntu0.18.04.4) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for libreoffice-common (1:6.0.7-0ubuntu0.18.04.2) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for libglib2.0-0:amd64 (2.56.3-0ubuntu0.18.04.1) ...
Processing triggers for cups (2.2.7-1ubuntu2.3) ...
Processing triggers for initramfs-tools (0.130ubuntu3.7) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-46-generic
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up policykit-1-gnome (0.105-6ubuntu2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for shared-mime-info (1.9-2) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Log ended: 2019-03-13 23:32:0
Eu posso ver agora que um monte de pacotes realmente importantes foram removidos. E pela aparência do meu histórico de bash, parece que liguei para ambos sudo apt remove python
e sudo apt remove python3
até mesmo antes de criar as versões mais recentes. Eu mudei minha pergunta original para refletir isso.
Resolvi o problema reinstalando o Ubuntu conforme sugerido (obrigado!).
Quando instalei o Ubuntu pela primeira vez, segui exatamente o conselho do Dual Boot Windows 10 e Linux Ubuntu em discos rígidos separados [duplicado] .
Eu ainda tinha o meio de instalação USB, então inicializei a partir dele, escolhi 'Algo mais' e então tive apenas três alterações a fazer (o Ubuntu foi instalado na partição /dev/sdd):
Portanto, em resumo, só tive que refazer parte das configurações que usei para minha instalação inicial e não precisei criar a tabela de partição primeiro, etc. Certifiquei-me de não selecionar a opção 'formatar partição' em nenhum lugar; a instalação foi concluída, todos os meus arquivos ainda estão lá. Obrigado pela ajuda de todos!