Eu baixei este pacote debian:
curl https://packages.microsoft.com/ubuntu/16.04/prod/pool/main/m/msodbcsql/msodbcsql_13.1.4.0-1_amd64.deb -o msodbcsql_13.1.4.0-1_amd64.deb
Em seguida, executei o seguinte comando:
sudo ACCEPT_EULA=Y dpkg -i msodbcsql_13.1.4.0-1_amd64.deb
E eu recebi as seguintes mensagens:
Selecting previously unselected package msodbcsql.
(Reading database ... 255078 files and directories currently installed.)
Preparing to unpack msodbcsql_13.1.4.0-1_amd64.deb ...
Unpacking msodbcsql (13.1.4.0-1) ...
dpkg: dependency problems prevent configuration of msodbcsql:
msodbcsql depends on unixodbc (>= 2.3.1); however:
Package unixodbc is not installed.
dpkg: error processing package msodbcsql (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
msodbcsql
Então percebi que tinha que instalar o unixodbc
, então fiz sudo apt-get install unixodbc
obtendo a seguinte saída:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
unixodbc : Depends: libodbc1 (>= 2.3.1) but it is not going to be installed
Depends: odbcinst1debian2 (>= 2.3.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Neste ponto, comecei a tentar remover o pacote "half installed" e tentei algumas abordagens diferentes:
Este sudo dpkg -r msodbcsql
dá:
(Reading database ... 255091 files and directories currently installed.)
Removing msodbcsql (13.1.4.0-1) ...
dpkg: error processing package msodbcsql (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
msodbcsql
Este sudo apt-get autoremove
dá:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
msodbcsql
0 to upgrade, 0 to newly install, 1 to remove and 10 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 255077 files and directories currently installed.)
Removing msodbcsql (13.1.4.0-1) ...
dpkg: error processing package msodbcsql (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
msodbcsql
E: Sub-process /usr/bin/dpkg returned an error code (1)
Este sudo apt-get --purge remove && sudo apt-get autoclean
dá:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
msodbcsql
0 to upgrade, 0 to newly install, 1 to remove and 10 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 255077 files and directories currently installed.)
Removing msodbcsql (13.1.4.0-1) ...
dpkg: error processing package msodbcsql (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
msodbcsql
E: Sub-process /usr/bin/dpkg returned an error code (1)
Este sudo apt-get -f install
dá:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
msodbcsql
0 to upgrade, 0 to newly install, 1 to remove and 10 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 255077 files and directories currently installed.)
Removing msodbcsql (13.1.4.0-1) ...
dpkg: error processing package msodbcsql (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
msodbcsql
E: Sub-process /usr/bin/dpkg returned an error code (1)
Eu também tentei procurar alguns curingas com sudo find / -name *msodbc*
no sistema de arquivos para esperar encontrar um arquivo binário enorme e removê-lo manualmente, mas nada de interessante saiu.
Estou um pouco preocupado com essa remoção, pois todas as tentativas anteriores parecem devolver a mesma mensagem / código de erro e não consigo remover esse pacote "parcialmente instalado" ou solucionar o problema.
Existe algum arquivo de log que eu possa dar uma olhada ou qualquer outra coisa que eu possa fazer para remover esse pacote?
Detalhes do meu Ubuntu:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
$ uname -a
Linux oe-laptop 4.10.0-37-generic #41~16.04.1-Ubuntu SMP Fri Oct 6 22:42:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux