dpkg: msodbcsql17 제거

dpkg: msodbcsql17 제거

제거하려고 하면 다음 오류가 발생합니다 msodbcsql17.

$ sudo dpkg --remove msodbcsql17
(Reading database ... 198868 files and directories currently installed.)
Removing msodbcsql17 (17.9.1.1-1) ...
dpkg: error processing package msodbcsql17 (--remove):
 installed msodbcsql17 package post-removal script subprocess returned error exit status 127
Errors were encountered while processing:
 msodbcsql17

나는 또한 다음을 시도했습니다 apt remove.

sudo apt remove msodbcsql17
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:
 mysql-shell : Depends: libffi7 (>= 3.3~20180313) but it is not going to be installed
               Depends: libpython3.8 (>= 3.8.2) but it is not installable
               Depends: libssl1.1 (>= 1.1.1) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

반품:

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  msodbcsql17 mysql-shell
0 upgraded, 0 newly installed, 2 to remove and 16 not upgraded.
2 not fully installed or removed.
After this operation, 127 MB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 198874 files and directories currently installed.)
Removing msodbcsql17 (17.9.1.1-1) ...
dpkg: error processing package msodbcsql17 (--remove):
 installed msodbcsql17 package post-removal script subprocess returned error exit status 127
dpkg: too many errors, stopping
Errors were encountered while processing:
 msodbcsql17
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

그것을 제거하는 방법에 대한 아이디어가 있습니까?

답변1

나도 같은 문제가 있다고 생각합니다. 제 경우에는 시스템에 설치되지 않은 msodbcsql17패키지의 제거 후 스크립트가 /var/lib/dpkg/info/msodbcsql17.postrm호출되는 것이 문제였습니다 . odbcinst나에게 도움이 된 것은 다음과 같습니다.

  • /var/lib/dpkg/info/msodbcsql17.postrmodbcinst먼저 및 로 db_purge시작하는 두 줄을 주석 처리합니다 remove.
  • msodbcsql17다음 으로 제거sudo apt-get remove msodbcsql17
  • 설치 odbcinstsudo apt-get install odbcinst
  • 삭제 후 스크립트를 다시 실행하세요.sudo /var/lib/dpkg/info/msodbcsql17.postrm remove
  • odbcinst으로 삭제sudo apt-get remove odbcinst

관련 정보