如何手动删除格式错误的软件包?


11

我试图通过Ubuntu 13.10 Saucy上的apt-get软件包管理器安装typo3。在安装过程中,无法配置软件包typo3-dummy并保持其状态:半安装

sudo dpkg --purge --force-all typo3-dummy 
(Reading database ... 107326
files and directories currently installed.) Removing typo3-dummy ...
apache2-maintscript-helper invoked from a modified environment. Please
hint required arguments manually dpkg: error processing typo3-dummy
(--purge):  subprocess installed post-removal script returned error
exit status 1 Processing triggers for ureadahead ... Errors were
encountered while processing:  typo3-dummy

我还可以尝试摆脱该软件包吗?我想避免全新安装。泰

编辑:使用sudo apt-get install -f返回以下输出

ben@cloudy:/etc$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  typo3-dummy
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 484 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 107326 files and directories currently installed.)
Removing typo3-dummy ...
apache2-maintscript-helper invoked from a modified environment. Please hint requ          ired arguments manually
dpkg: error processing typo3-dummy (--remove):
 subprocess installed post-removal script returned error exit status 1
Processing triggers for ureadahead ...
No apport report written because MaxReports is reached already
                                                              Errors were encoun          tered while processing:
 typo3-dummy
E: Sub-process /usr/bin/dpkg returned an error code (1)

为什么手动你想删除它>
NUX

因为所有“经典”方式似乎都失败了...清除/删除任何内容均
无效

更新我的答案
马钱

您的答案就像一个魅力!非常感谢
Ben Matheja 2014年

1
遇到了同样的问题,并像nux所说的那样解决了。为此非常感谢!但是我要用gedit编辑/ var / lib / dpkg / status:sudo gedit / var / lib / dpkg / status对于那些不熟悉控制台的人;)
user1697337 2014年

Answers:


25

尝试:

sudo vi /var/lib/dpkg/status 

删除有关该软件包的所有条目并保存,然后重试。

sudo apt-get update

我试了一下,并在上面发布了输出。
Ben Matheja 2014年

是的,我会使用gedit或至少使用nano作为编辑器,而不是使用vi,以防某些新手偶然发现此问题,但是您的回答非常好。简洁高效。奇迹般有效。谢谢!
Manchineel

我错误地加载了mssql-server而不是PDO for php,这是经过2个小时的搜索后有效的答案!谢谢您
詹姆斯·贝利

0

步骤1,创建假文件:

touch ~/Desktop/test.sh

步骤2,建立符号连结:

sudo ln -fs  ~/Desktop/test.sh /usr/share/mysql-common/configure-symlinks

第三步,运行自动删除:

sudo apt-get autoremove

2
欢迎来到Ask Ubuntu,您能否再详细说明一下这种方法的作用以及如何解决问题中的问题?
Michael Lindman
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.