Ubuntu 22.04
Hoje quando eu emito
sudo apt-get upgrade
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:
unixodbc : Depends: odbcinst1debian2 (>= 2.3.11) but it is not installed
Depends: libodbc1 (>= 2.3.11) but 2.3.9-5 is installed
unixodbc-dev : Depends: odbcinst1debian2 (= 2.3.11) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
então como sugerido obtendo
sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
libodbccr2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libodbc1 odbcinst odbcinst1debian2
Suggested packages:
unixodbc-bin
The following NEW packages will be installed:
odbcinst1debian2
The following packages will be upgraded:
libodbc1 odbcinst
2 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/607 kB of archives.
After this operation, 863 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 725562 files and directories currently installed.)
Preparing to unpack .../odbcinst_2.3.11_amd64.deb ...
Unpacking odbcinst (2.3.11) over (2.3.9-5) ...
dpkg: error processing archive /var/cache/apt/archives/odbcinst_2.3.11_amd64.deb (--unpack):
trying to overwrite '/etc/odbc.ini', which is also in package unixodbc-common 2.3.9-5
Preparing to unpack .../odbcinst1debian2_2.3.11_amd64.deb ...
Unpacking odbcinst1debian2:amd64 (2.3.11) ...
dpkg: error processing archive /var/cache/apt/archives/odbcinst1debian2_2.3.11_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libodbcinst.so.2.0.0', which is also in package libodbcinst2:amd64 2.3.9-5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../libodbc1_2.3.11_amd64.deb ...
Unpacking libodbc1:amd64 (2.3.11) over (2.3.9-5) ...
dpkg: error processing archive /var/cache/apt/archives/libodbc1_2.3.11_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libodbc.so.2.0.0', which is also in package libodbc2:amd64 2.3.9-5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/odbcinst_2.3.11_amd64.deb
/var/cache/apt/archives/odbcinst1debian2_2.3.11_amd64.deb
/var/cache/apt/archives/libodbc1_2.3.11_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Como sair desse buraco?
Não tenho problemas em limpar qualquer pacote para resolver esse problema. Este é exatamente o tipo de caso extremo que está atrasando a adoção em massa do Linux. Meu instinto diz que fique quieto até que os proprietários de pacotes ofensivos empurrem sua correção upstream.
Eu tentei muitos palpites, incluindo... sem sucesso... Sugestões?
sudo apt-get autoremove
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:
unixodbc : Depends: odbcinst1debian2 (>= 2.3.11) but it is not installed
Depends: libodbc1 (>= 2.3.11) but 2.3.9-5 is installed
unixodbc-dev : Depends: odbcinst1debian2 (= 2.3.11) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Esses comandos me permitiram remover os pacotes ofensivos
anteriormente, o próximo comando falhou agora está funcionando
Sua saída diz que você tem dois pacotes
libodbc1
elibodbc2
está tentando fornecer o mesmo arquivo (libodbc.so.2.0.0
). Isso é ruim.Em outras palavras, esses dois pacotes são incompatíveis . Apenas um deles pode ser instalado sem forçar (
--force-overwrite
). Somente um usuário experiente (como você) deve arriscar forçar e registrar em algum lugar que você fez isso - desinstalar A pode exigir a reinstalação de B.Usuários inexperientes não devem tentar instalar ambos usando o pacote deb. Instalar um a partir do código-fonte ou usar um sistema de pacotes diferente pode ser preferível.