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 / unix / Perguntas / 785578
Accepted
Michele Turrini
Michele Turrini
Asked: 2024-10-24 21:43:09 +0800 CST2024-10-24 21:43:09 +0800 CST 2024-10-24 21:43:09 +0800 CST

APT quebrado devido a bibliotecas python quebradas

  • 772

Estou no Debian 12. Cometi um erro de novato ao instalar bibliotecas Python (numpy, pandas, sklearn) usando o apt e agora sempre que tento instalar ou desinstalar alguma coisa recebo esse erro.

Ao instalar

thedude@192:~$ sudo apt install sl
[sudo] password for thedude: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python3-bottleneck : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                      Depends: python3-numpy-abi9
 python3-contourpy : Depends: python3-numpy but it is not going to be installed
 python3-matplotlib : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                      Depends: python3-numpy-abi9
 python3-numexpr : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                   Depends: python3-numpy-abi9
 python3-pandas : Depends: python3-numpy but it is not going to be installed
                  Depends: python3-numpy (>= 1:1.18.5~) but it is not going to be installed or
                           python3 (< 3.10) but 3.11.2-1+b1 is to be installed
 python3-pandas-lib : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                      Depends: python3-numpy-abi9
                      Recommends: python3-numba but it is not going to be installed
 python3-pythran : Depends: python3-numpy but it is not going to be installed
 python3-scipy : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                 Depends: python3-numpy-abi9
 python3-sklearn : Depends: python3-numpy but it is not going to be installed
 python3-sklearn-lib : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                       Depends: python3-numpy-abi9
 python3-tables : Depends: python3-numpy but it is not going to be installed
 python3-tables-lib : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                      Depends: python3-numpy-abi9
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Ao desinstalar:

thedude@192:~$ sudo apt remove python3-numpy
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'python3-numpy' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python3-bottleneck : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                      Depends: python3-numpy-abi9
 python3-contourpy : Depends: python3-numpy but it is not going to be installed
 python3-matplotlib : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                      Depends: python3-numpy-abi9
 python3-numexpr : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                   Depends: python3-numpy-abi9
 python3-pandas : Depends: python3-numpy but it is not going to be installed
                  Depends: python3-numpy (>= 1:1.18.5~) but it is not going to be installed or
                           python3 (< 3.10) but 3.11.2-1+b1 is to be installed
 python3-pandas-lib : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                      Depends: python3-numpy-abi9
                      Recommends: python3-numba but it is not going to be installed
 python3-pythran : Depends: python3-numpy but it is not going to be installed
 python3-scipy : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                 Depends: python3-numpy-abi9
 python3-sklearn : Depends: python3-numpy but it is not going to be installed
 python3-sklearn-lib : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                       Depends: python3-numpy-abi9
 python3-tables : Depends: python3-numpy but it is not going to be installed
 python3-tables-lib : Depends: python3-numpy (>= 1:1.22.0) but it is not going to be installed
                      Depends: python3-numpy-abi9
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Tentei apt fix-broken installcomo a mensagem de erro sugere.

thedude@192:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  fonts-lato icu-devtools libclang-cpp14 libffi-dev libicu-dev libllvm14
  libncurses-dev libpfm4 libtinfo-dev libxml2-dev libz3-dev
  llvm-14-linker-tools llvm-14-runtime llvm-14-tools nss-plugin-pem
  python3-yaml sphinx-rtd-theme-common
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  python3-numpy
Suggested packages:
  gfortran
The following NEW packages will be installed:
  python3-numpy
0 upgraded, 1 newly installed, 0 to remove and 27 not upgraded.
Need to get 5,209 kB of archives.
After this operation, 28.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://deb.debian.org/debian bookworm/main amd64 python3-numpy amd64 1:1.24.2-1
  404  Not Found [IP: 146.75.54.132 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/n/numpy/python3-numpy_1.24.2-1_amd64.deb  404  Not Found [IP: 146.75.54.132 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Meu entendimento é que a biblioteca que está gerando o erro é numpy. Descobri que ela é instalada digitando:

thedude@192:~$ sudo apt list python3-numpy
Listing... Done
python3-numpy/stable 1:1.24.2-1 amd64

Mas como mostrado não consigo removê-lo. Tentei atualizar e também --fix-missinge tambémautoremove

thedude@192:~$ sudo apt --fix-broken install --fix-missing
[sudo] password for thedude: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  fonts-lato icu-devtools libclang-cpp14 libffi-dev libicu-dev libllvm14
  libncurses-dev libpfm4 libtinfo-dev libxml2-dev libz3-dev
  llvm-14-linker-tools llvm-14-runtime llvm-14-tools nss-plugin-pem
  python3-yaml sphinx-rtd-theme-common
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  python3-numpy
Suggested packages:
  gfortran
The following NEW packages will be installed:
  python3-numpy
0 upgraded, 1 newly installed, 0 to remove and 27 not upgraded.
Need to get 5,209 kB of archives.
After this operation, 28.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://deb.debian.org/debian bookworm/main amd64 python3-numpy amd64 1:1.24.2-1
  404  Not Found [IP: 146.75.54.132 80]
Unable to correct missing packages.
E: Failed to fetch http://deb.debian.org/debian/pool/main/n/numpy/python3-numpy_1.24.2-1_amd64.deb  404  Not Found [IP: 146.75.54.132 80]
E: Aborting install.

Tentei updatee funciona bem, mas não faz diferença.

Há algo que eu possa fazer para consertar isso?

debian
  • 2 2 respostas
  • 603 Views

2 respostas

  • Voted
  1. Best Answer
    Michele Turrini
    2024-10-25T02:41:47+08:002024-10-25T02:41:47+08:00

    Créditos para @Stephen Kitt que sugeriu esta resposta nos comentários. Resolvi fazendo

    sudo rm /var/lib/apt/lists/*_*
    sudo apt update
    sudo apt --fix-broken install
    
    • 9
  2. MatsK
    2024-10-24T22:29:19+08:002024-10-24T22:29:19+08:00

    A essência do erro “404 Not Found”. É um código de status HTTP que indica que o recurso solicitado não pôde ser encontrado no servidor. No contexto do apt-get, isso significa que o pacote que você está tentando acessar não foi encontrado no servidor do repositório.

    Err:1 http://deb.debian.org/debian bookworm/main amd64 python3-numpy amd64 1:1.24.2-1
      404  Not Found [IP: 146.75.54.132 80]
    

    Execute sudo apt updatee tente instalar novamente python3-numpy.

    Também é um bom hábito executar sudo apt updatee depois sudo apt upgradeantes de instalar os pacotes.

    • 1

relate perguntas

  • Configuração do GRUB para reconhecer diferentes ambientes de desktop (instalações) da mesma distribuição Linux

  • astyle não altera a formatação do arquivo de origem

  • Recebendo e-mail em um novo Debian fresco

  • Debian Stretch: gnome-software segfault em libgs_plugin_systemd-updates.so

  • Como digitar ü no Pinyin IME?

Sidebar

Stats

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

    Possível firmware ausente /lib/firmware/i915/* para o módulo i915

    • 3 respostas
  • Marko Smith

    Falha ao buscar o repositório de backports jessie

    • 4 respostas
  • Marko Smith

    Como exportar uma chave privada GPG e uma chave pública para um arquivo

    • 4 respostas
  • Marko Smith

    Como podemos executar um comando armazenado em uma variável?

    • 5 respostas
  • Marko Smith

    Como configurar o systemd-resolved e o systemd-networkd para usar o servidor DNS local para resolver domínios locais e o servidor DNS remoto para domínios remotos?

    • 3 respostas
  • Marko Smith

    apt-get update error no Kali Linux após a atualização do dist [duplicado]

    • 2 respostas
  • Marko Smith

    Como ver as últimas linhas x do log de serviço systemctl

    • 5 respostas
  • Marko Smith

    Nano - pule para o final do arquivo

    • 8 respostas
  • Marko Smith

    erro grub: você precisa carregar o kernel primeiro

    • 4 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Martin Hope
    user12345 Falha ao buscar o repositório de backports jessie 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl Por que a maioria dos exemplos do systemd contém WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky Como exportar uma chave privada GPG e uma chave pública para um arquivo 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll status systemctl mostra: "Estado: degradado" 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim Como podemos executar um comando armazenado em uma variável? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S Por que /dev/null é um arquivo? Por que sua função não é implementada como um programa simples? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 Como ver as últimas linhas x do log de serviço systemctl 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - pule para o final do arquivo 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla Por que verdadeiro e falso são tão grandes? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

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