首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >dpkg:删除msodbcsql17

dpkg:删除msodbcsql17
EN

Unix & Linux用户
提问于 2022-06-20 10:26:35
回答 1查看 1.3K关注 0票数 2

当我试图卸载msodbcsql17时,我得到了这个错误:

代码语言:javascript
复制
$ 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

代码语言:javascript
复制
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).

另外:

代码语言:javascript
复制
$ 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)

有什么办法把它移除吗?

EN

回答 1

Unix & Linux用户

发布于 2022-06-20 19:29:42

我想我也有同样的问题。在我的例子中,问题在于位于/var/lib/dpkg/info/msodbcsql17.postrm的包D1的后移除脚本正在调用odbcinst --该脚本没有安装在我的系统上。对我有用的是:

  • 首先,注释/var/lib/dpkg/info/msodbcsql17.postrm中以odbcinstdb_purge开头的remove部分中的两行。
  • msodbcsql17卸载sudo apt-get remove msodbcsql17
  • odbcinst安装sudo apt-get install odbcinst
  • 使用sudo /var/lib/dpkg/info/msodbcsql17.postrm remove重新运行删除后脚本
  • odbcinst删除sudo apt-get remove odbcinst
票数 5
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/706827

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档