Depois de atualizar para o Ubuntu MATE 22.04 Jammy do Ubuntu MATE 21.10 Impish , quando executo lsb_release
, recebo este erro:
$ lsb_release
bash: /usr/bin/lsb_release: /usr/bin/python3: bad interpreter: No such file or directory
Comandos relevantes:
$ whereis lsb_release
lsb_release: /usr/bin/lsb_release /usr/share/man/man1/lsb_release.1.gz
$ python -V
bash: python: command not found
$ python3 -V
bash: python3: command not found
$ python3.10 -V
Python 3.10.4
$ which python3 or $ which python
Nothing.
$ which python3.10
/usr/bin/python3.10
$ whereis python
python: /usr/bin/python /usr/share/python /usr/share/man/man1/python.1.gz
$ whereis python3
python3: /usr/lib/python3 /etc/python3 /usr/share/python3 /usr/share/man/man1/python3.1.gz
$ whereis python3.10
python3.10: /usr/bin/python3.10 /usr/lib/python3.10 /etc/python3.10 /usr/local/lib/python3.10 /usr/include/python3.10 /usr/share/man/man1/python3.10.1.gz
ls -lsh /usr/bin/python*
0 lrwxrwxrwx 1 root root 7 Oct 11 2021 /usr/bin/python -> python3
0 lrwxrwxrwx 1 root root 9 Jul 28 2021 /usr/bin/python2 -> python2.7
3.5M -rwxr-xr-x 1 root root 3.5M Mar 12 11:54 /usr/bin/python2.7
5.7M -rwxr-xr-x 1 root root 5.7M Apr 2 14:34 /usr/bin/python3.10
0 lrwxrwxrwx 1 root root 34 Apr 2 14:34 /usr/bin/python3.10-config -> x86_64-linux-gnu-python3.10-config
0 lrwxrwxrwx 1 root root 17 Mar 25 18:11 /usr/bin/python3-config -> python3.10-config
4.0K -rwxr-xr-x 1 root root 1.8K Aug 6 2019 /usr/bin/python3-unidiff
$ sudo ln -s /usr/bin/python3 /usr/bin/python3.10
ln: failed to create symbolic link '/usr/bin/python3.10': File exists
$ sudo update-alternatives --config python3
update-alternatives: error: no alternatives for python3
$ sudo update-alternatives --config python
update-alternatives: error: no alternatives for python
A maneira como eu descobri sobre o lsb_release
erro é porque mate-menu
(Advanced MATE Menu) parou de funcionar (desapareceu da barra de tarefas), e quando tentei reinstalá-lo (usando Synaptic), recebi este erro:
E: mate-menu: package is in a very bad inconsistent state; you should reinstall it before attempting configuration
Can't exec "lsb_release": No such file or directory at /usr/share/perl5/Debconf/FrontEnd/Gnome.pm line 184, <> line 1.
Use of uninitialized value in lc at /usr/share/perl5/Debconf/FrontEnd/Gnome.pm line 184, <> line 1.
(Reading database ... 378043 files and directories currently installed.)
Preparing to unpack .../lsb-release_11.1.0ubuntu4_all.deb ...
Unpacking lsb-release (11.1.0ubuntu4) over (11.1.0ubuntu4) ...
dpkg: error processing package mate-menu (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Setting up lsb-release (11.1.0ubuntu4) ...
Processing triggers for man-db (2.10.2-1) ...
Errors were encountered while processing:
mate-menu
Embora eu tenha encontrado esses tópicos semelhantes, eles não estão funcionando para mim. Obrigada.
Conforme sugerido no comentário @steeldriver, eu troquei os argumentos no meu
ln -s
comando. A reversão resolveu o problema: