AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / ubuntu / Perguntas / 1406192
Accepted
Jags
Jags
Asked: 2022-05-03 10:21:13 +0800 CST2022-05-03 10:21:13 +0800 CST 2022-05-03 10:21:13 +0800 CST

Erro lsb_release: bash: /usr/bin/lsb_release: /usr/bin/python3: intérprete ruim: nenhum arquivo ou diretório

  • 772

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_releaseerro é 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.

https://askubuntu.com/a/919416/928088

https://stackoverflow.com/q/62329393/11855487

apt
  • 1 1 respostas
  • 2712 Views

1 respostas

  • Voted
  1. Best Answer
    Jags
    2022-05-03T12:52:31+08:002022-05-03T12:52:31+08:00

    Conforme sugerido no comentário @steeldriver, eu troquei os argumentos no meu ln -scomando. A reversão resolveu o problema:

    sudo ln -s /usr/bin/python3.10 /usr/bin/python3
    
    • 2

relate perguntas

  • Como posso ver todas as versões de um pacote que estão disponíveis no arquivo?

  • Como os PPAs podem ser removidos?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Existe um comando para listar todos os usuários? Também para adicionar, excluir, modificar usuários, no terminal?

    • 9 respostas
  • Marko Smith

    Como excluir um diretório não vazio no Terminal?

    • 4 respostas
  • Marko Smith

    Como descompactar um arquivo zip do Terminal?

    • 9 respostas
  • Marko Smith

    Como instalo um arquivo .deb por meio da linha de comando?

    • 11 respostas
  • Marko Smith

    Como instalo um arquivo .tar.gz (ou .tar.bz2)?

    • 14 respostas
  • Marko Smith

    Como listar todos os pacotes instalados

    • 24 respostas
  • Martin Hope
    Flimm Como posso usar o docker sem sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp Como faço para salvar a saída do terminal em um arquivo? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd Como descompactar um arquivo zip do Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    TheXed Como instalo um arquivo .deb por meio da linha de comando? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan Como listar todos os pacotes instalados 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    David Barry Como determino o tamanho total de um diretório (pasta) na linha de comando? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "Os seguintes pacotes foram retidos:" Por que e como resolvo isso? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford Como os PPAs podem ser removidos? 2010-07-30 01:09:42 +0800 CST

Hot tag

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve