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 / 1538727
Accepted
Anton Samokat
Anton Samokat
Asked: 2025-01-21 00:57:08 +0800 CST2025-01-21 00:57:08 +0800 CST 2025-01-21 00:57:08 +0800 CST

Como reverter um pacote rebaixado? (Como cancelar/reverter o downgrade do pacote?)

  • 772

Tentei instalar libmagick++-dev(pergunta relacionada: Como instalar libmagick++-dev no Ubuntu 20.04? ). Mas é preciso fazer downgrade de vários pacotes. Reverti vários deles. Mas, como se viu, o restante do downgrade requer a remoção de muitos dos pacotes instalados. Decidi não fazer isso. Agora, gostaria de restaurar as versões anteriores dos pacotes instalados. Como posso fazer isso?

O registro das minhas tentativas é o seguinte:

sudo apt install libmagick++-dev 
Reading package lists... Done
Building dependency tree       
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:
 libmagick++-dev : Depends: imagemagick-6-common (= 8:6.9.10.23+dfsg-2.1ubuntu11) but 8:6.9.10.23+dfsg-2.1ubuntu11.10 is to be installed
                   Depends: libmagick++-6.q16-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

------

$ sudo apt install imagemagick-6-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
imagemagick-6-common is already the newest version (8:6.9.10.23+dfsg-2.1ubuntu11.10).
imagemagick-6-common set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.

------

$ sudo apt install imagemagick-6-common=8:6.9.10.23+dfsg-2.1ubuntu11
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libimage-magick-perl
The following packages will be DOWNGRADED:
  imagemagick-6-common
0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 15 not upgraded.
Need to get 60,8 kB of archives.
After this operation, 102 kB disk space will be freed.
Do you want to continue? [Y/n] 

Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 imagemagick-6-common all 8:6.9.10.23+dfsg-2.1ubuntu11 [60,8 kB]
Fetched 60,8 kB in 1s (82,4 kB/s)               
(Reading database ... 365848 files and directories currently installed.)
Removing libimage-magick-perl (8:6.9.10.23+dfsg-2.1ubuntu11.10) ...
dpkg: warning: downgrading imagemagick-6-common from 8:6.9.10.23+dfsg-2.1ubuntu11.10 to 8:6.9.10.23+dfsg-2.1ubuntu11
(Reading database ... 365814 files and directories currently installed.)
Preparing to unpack .../imagemagick-6-common_8%3a6.9.10.23+dfsg-2.1ubuntu11_all.deb ...
Unpacking imagemagick-6-common (8:6.9.10.23+dfsg-2.1ubuntu11) over (8:6.9.10.23+dfsg-2.1ubuntu11.10) ...
Setting up imagemagick-6-common (8:6.9.10.23+dfsg-2.1ubuntu11) ...
Installing new version of config file /etc/ImageMagick-6/delegates.xml ...
Processing triggers for man-db (2.9.1-1) ...

----

Reverting is not working:

sudo apt install imagemagick-6-common=8:6.9.10.23+dfsg-2.1ubuntu11.10
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '8:6.9.10.23+dfsg-2.1ubuntu11.10' for 'imagemagick-6-common' was not found

apt list imagemagick-6-common
Listing... Done
imagemagick-6-common/focal,focal,now 8:6.9.10.23+dfsg-2.1ubuntu11 all [installed]

apt-cache madison imagemagick-6-common  # list all versions of a package
imagemagick-6-common | 8:6.9.10.23+dfsg-2.1ubuntu11 | http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
imagemagick-6-common | 8:6.9.10.23+dfsg-2.1ubuntu11 | http://archive.ubuntu.com/ubuntu focal/universe i386 Packages

apt policy  imagemagick-6-common
imagemagick-6-common:
  Installed: 8:6.9.10.23+dfsg-2.1ubuntu11
  Candidate: 8:6.9.10.23+dfsg-2.1ubuntu11
  Version table:
 *** 8:6.9.10.23+dfsg-2.1ubuntu11 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages
        100 /var/lib/dpkg/status

A versão anterior do pacote imagemagick-6-common=8:6.9.10.23+dfsg-2.1ubuntu11.10por algum motivo não está disponível no sistema de gerenciamento de pacotes. Como restaurá-lo?

apt
  • 1 1 respostas
  • 36 Views

1 respostas

  • Voted
  1. Best Answer
    Anton Samokat
    2025-01-25T06:14:07+08:002025-01-25T06:14:07+08:00

    Normalmente, para reverter o pacote rebaixado, basta sudo apt install package-nameusar o seguinte.

    Eu tive problemas com fontes apt. Eu esqueci que defina fontes Debian em vez de fontes apt Ubuntu. E havia outras versões de pacotes. Detalhes nesta resposta para a pergunta relacionada "Como instalar libmagick++-dev no Ubuntu 20.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