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 / 1525183
Accepted
Thystra
Thystra
Asked: 2024-09-02 02:36:38 +0800 CST2024-09-02 02:36:38 +0800 CST 2024-09-02 02:36:38 +0800 CST

Pergunta sobre dependência APT

  • 772

Estou tentando instalar as dependências para compilar o Strongswan, pois os pacotes principais parecem estar quebrados.

Quando tento instalar o pacote libsoup, recebo o seguinte erro:

~/strongswan-5.9.14# apt install -f libsoup2.4-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libbrotli-dev : Depends: libbrotli1 (= 1.1.0-2build2) but 1.1.0-2+ubuntu22.04.1+deb.sury.org+1 is to be installed

Isto está em uma instalação de servidor, recentemente atualizada para 24.04.1 LTS.

Atualização: informações do pacote

# apt policy libbrotli1
libbrotli1:
  Installed: 1.1.0-2+ubuntu22.04.1+deb.sury.org+1
  Candidate: 1.1.0-2+ubuntu22.04.1+deb.sury.org+1
  Version table:
 *** 1.1.0-2+ubuntu22.04.1+deb.sury.org+1 100
        100 /var/lib/dpkg/status
     1.1.0-2build2 500
        500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages

# apt-get remove libbrotli1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 shim-signed : Depends: grub-efi-amd64-signed (>= 1.191~) but it is not going to be installed or
                        grub-efi-arm64-signed (>= 1.191~) but it is not installable or
                        base-files (< 12.3) but 13ubuntu10.1 is to be installed
               Depends: grub-efi-amd64-signed (>= 1.187.2~) but it is not going to be installed or
                        grub-efi-arm64-signed (>= 1.187.2~) but it is not installable
               Depends: grub2-common (>= 2.04-1ubuntu24) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Vejo que o pacote instalado é do ppa, e há um pacote nos repositórios. Qual é a melhor / segura maneira de remover e reinstalar o pacote do repositório sem quebrar tudo?

apt
  • 1 1 respostas
  • 38 Views

1 respostas

  • Voted
  1. Best Answer
    Thystra
    2024-09-03T03:30:35+08:002024-09-03T03:30:35+08:00

    Para resolver isso, alterei a prioridade do pin do repositório:

    em /etc/apt/preferences.d criei um arquivo lib.pref

    Package: *
    Pin: origin archive.ubuntu.com
    Pin-Priority: 1001
    

    Após a execução apt update, apt policy libbrotli1agora mostrou:

    apt policy libbrotli1
    libbrotli1:
      Installed: 1.1.0-2+ubuntu22.04.1+deb.sury.org+1
      Candidate: 1.1.0-2build2
      Version table:
     *** 1.1.0-2+ubuntu22.04.1+deb.sury.org+1 100
            100 /var/lib/dpkg/status
         1.1.0-2build2 1001
           1001 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages
    

    Consegui então reinstalar o pacote.

     apt reinstall libbrotli1
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following packages will be DOWNGRADED:
      libbrotli1
    0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
    Need to get 331 kB of archives.
    After this operation, 3072 B of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://archive.ubuntu.com/ubuntu noble/main amd64 libbrotli1 amd64 1.1.0-2build2 [331 kB]
    Fetched 331 kB in 0s (679 kB/s)    
    dpkg: warning: downgrading libbrotli1:amd64 from 1.1.0-2+ubuntu22.04.1+deb.sury.org+1 to 1.1.0-2build2
    (Reading database ... 119664 files and directories currently installed.)
    Preparing to unpack .../libbrotli1_1.1.0-2build2_amd64.deb ...
    Unpacking libbrotli1:amd64 (1.1.0-2build2) over (1.1.0-2+ubuntu22.04.1+deb.sury.org+1) ...
    Setting up libbrotli1:amd64 (1.1.0-2build2) ...
    Processing triggers for libc-bin (2.39-0ubuntu8.3) ...
    Scanning processes...                                                                                                                                    
    Scanning candidates...                                                                                                                                   
    Scanning linux images...                                                                                                                                 
    
    Running kernel seems to be up-to-date.
    
    Restarting services...
     systemctl restart clamav-freshclam.service packagekit.service php8.3-fpm.service sogo.service
    
    No containers need to be restarted.
    
    No user sessions are running outdated binaries.
    
    No VM guests are running outdated hypervisor (qemu) binaries on this host.
    

    E então consegui instalar as dependências sem problemas.

    Comentei as entradas em lib.pref para não atrapalhar coisas futuras, mas está lá caso haja outro pacote que precise ser atualizado do ppa 22.04.

    • 0

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