Problema com o apt-get -f install

1

Eu tentei instalar o lynx para mostrar a alguém como o lynx funciona, mas quando eu corri o apt-get install lynx , é isso que acontece.

sudo apt-get install lynx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
lynx is already the newest version (2.8.9dev8-4ubuntu1).
lynx set to manually installed.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libreoffice-core : Depends: libreoffice-common (> 1:5.1.4) but it is not going to be installed
 libreoffice-java-common : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
 libreoffice-style-breeze : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
 libreoffice-style-elementary : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
 libreoffice-style-galaxy : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
 libreoffice-style-oxygen : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
 libreoffice-style-tango : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Então, naturalmente eu tento os dois sudo apt-get -f install , eis o que acontece:

sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libreoffice-common
Suggested packages:
  libreoffice-style-hicontrast libreoffice-style-human libreoffice-style-sifr
The following NEW packages will be installed:
  libreoffice-common
0 upgraded, 1 newly installed, 0 to remove and 23 not upgraded.
21 not fully installed or removed.
Need to get 0 B/22.3 MB of archives.
After this operation, 84.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 345619 files and directories currently installed.)
Preparing to unpack .../libreoffice-common_1%3a5.1.4-0ubuntu1_all.deb ...
Unpacking libreoffice-common (1:5.1.4-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a5.1.4-0ubuntu1_all.deb (--unpack):
 trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1.2-9782
rmdir: failed to remove '/var/lib/libreoffice/share/prereg/': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice/share/': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice/program/': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice': No such file or directory
rmdir: failed to remove '/var/lib/libreoffice': No such file or directory
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libreoffice-common_1%3a5.1.4-0ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Então agora estou preso. Eu não tenho idéia de como corrigir esse problema. Pesquisando não oferece ajuda, pois tudo que todos sugerem não funciona.

As pessoas sugerem a execução de sudo apt-get remove libreoffice* --purge , mas, novamente, nenhum comando apt-get funciona porque está desconectado desse erro de porcaria que me diz para corrigi-lo fazendo o -f install .

Se alguém souber como consertar isso, por favor me avise. Eu realmente odiaria ter que formatar e começar de novo.

Quando tento remover a falsa instalação do OpenOffice.org:

$ sudo apt-get remove -f 'openoffice.*'
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'openoffice.org-debian-menus' for glob 'openoffice.*'
[...snip...]
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libreoffice-core : Depends: libreoffice-common (> 1:5.1.4) but it is not going to be installed
 libreoffice-java-common : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
 libreoffice-style-breeze : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
 libreoffice-style-elementary : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
 libreoffice-style-galaxy : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
 libreoffice-style-oxygen : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
 libreoffice-style-tango : Depends: libreoffice-common (= 1:5.1.4-0ubuntu1) but it is not going to be installed
 libreoffice5.2-base : Depends: libreoffice5.2 (>= 5.2.4.2) but it is not installable
                       Depends: libreoffice5.2 (<= 5.2.4.2-2) but it is not installable
 libreoffice5.2-calc : Depends: libreoffice5.2 (>= 5.2.4.2) but it is not installable
                       Depends: libreoffice5.2 (<= 5.2.4.2-2) but it is not installable
 libreoffice5.2-dict-en : Depends: libreoffice5.2 (>= 5.2.4.2) but it is not installable
                          Depends: libreoffice5.2 (<= 5.2.4.2-2) but it is not installable
 libreoffice5.2-dict-es : Depends: libreoffice5.2 (>= 5.2.4.2) but it is not installable
                          Depends: libreoffice5.2 (<= 5.2.4.2-2) but it is not installable
 libreoffice5.2-dict-fr : Depends: libreoffice5.2 (>= 5.2.4.2) but it is not installable
                          Depends: libreoffice5.2 (<= 5.2.4.2-2) but it is not installable
 libreoffice5.2-draw : Depends: libreoffice5.2 (>= 5.2.4.2) but it is not installable
                       Depends: libreoffice5.2 (<= 5.2.4.2-2) but it is not installable
 libreoffice5.2-en-us : Depends: libreoffice5.2 (>= 5.2.4.2) but it is not installable
                        Depends: libreoffice5.2 (<= 5.2.4.2-2) but it is not installable
 libreoffice5.2-impress : Depends: libreoffice5.2 (>= 5.2.4.2) but it is not installable
                          Depends: libreoffice5.2 (<= 5.2.4.2-2) but it is not installable
 libreoffice5.2-math : Depends: libreoffice5.2 (>= 5.2.4.2) but it is not installable
                       Depends: libreoffice5.2 (<= 5.2.4.2-2) but it is not installable
 libreoffice5.2-writer : Depends: libreoffice5.2 (>= 5.2.4.2) but it is not installable
                         Depends: libreoffice5.2 (<= 5.2.4.2-2) but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

( versão integral )

    
por kate_h 09.01.2017 / 08:47

5 respostas

0

Em nossa interação nos comentários identificamos uma instalação e sobras do LibreOffice v5.2. * de uma instalação do OpenOffice.org, além da instalação parcial do LibreOffice v5.1. * dos repositórios de pacotes padrão do Ubuntu. Nós poderíamos resolver o problema por

  1. removendo (os restos do) LibreOffice v5.2. * e OpenOffice.org manualmente:

    dpkg-query -Wf '${Status;1} ${Package}\n' openoffice\* libreoffice5.2\* libobasis5.2\* |
    sed -ne 's/^i //p' |
    xargs sudo dpkg --remove
    

    (Explicação conforme solicitado: o primeiro campo em cada linha da saída dpkg-query é o status do pacote (conforme definido pela opção -f format). i significa "instalado", portanto, sed -ne 's/^i //p' somente linhas de impressão começando com i e também remover essa parte.)

  2. e, em seguida, corrige os problemas restantes de gerenciamento de pacotes com o Apt e fornece uma dica para a seleção de uma solução que envolve a instalação de libreoffice-common (dos repositórios padrão):

    sudo apt-get install -f libreoffice-common
    
por David Foerster 12.01.2017 / 10:42
1

Parece que sua pasta de dados de aplicativos do LibreOffice ficou confusa, e a solução fácil é removê-los:

sudo rm /usr/bin/soffice
sudo rm -r /var/lib/libreoffice

Se você quiser continuar usando o LibreOffice, seria aconselhável remover o OpenOffice, possivelmente é por isso que existem openoffice-debian-menus package:

sudo apt-get purge openoffice
sudo apt-get purge openoffice-debian-menus

Seguido pela instalação do Último LibreOffice:

sudo add-apt-repository ppa:libreoffice/ppa
sudo apt update; sudo apt dist-upgrade
sudo apt install libreoffice-gtk2 libreoffice-gnome

Fonte: apt preso com erros no libreoffice

    
por Liso 09.01.2017 / 09:53
0

Parece que você tenta usar o Openoffice e o Libreoffice juntos ... (?) Apt não pode configurar o libreoffice-common porque ele sobrescreverá openoffice-debian-menus, que também é instalado.

dpkg: error processing archive /var/cache/apt/archives/libreoffice-common_1%3a5.1.4-0ubuntu1_all.deb (--unpack):
 trying to overwrite '/usr/bin/soffice', which is also in package openoffice-debian-menus 4.1.2-9782

Tente remover o openoffice (openoffice-debian-menus) e faça o "install -f" novamente ...

Saudações

    
por Qterra 09.01.2017 / 09:14
-1

Tente remover o libreoffice com o dpkg:

sudo dpkg -r 'libreoffice*'

Você também pode listar as informações para o libreoffice com o seguinte comando:

sudo dpkg -l 'libreoffice*'

E eu acho que você já tem o Lynx instalado

lynx is already the newest version (2.8.9dev8-4ubuntu1).
lynx set to manually installed.
    
por ZeroFirst 09.01.2017 / 10:39
-1

Você pode executar este comando no terminal

apt-get remove -f

que você deseja remover

Obrigado!

    
por Milan rathod 12.01.2017 / 10:32