从中止的 tt-rss 安装中恢复

从中止的 tt-rss 安装中恢复

我尝试安装 tt-rss,但安装到一半时我决定不安装数据库和 Web 服务器,所以我放弃了安装。现在我无法安装任何更新。软件包管理器告诉我要修复问题才能apt-get -f install安装任何东西。

当我运行时我得到:

root@cabin-htpc:/var/cache/debconf# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  apache2 apache2-data apache2-utils dbconfig-common guile-2.0-libs javascript-common libandroid-properties1 libapache2-mod-php5 libcec-platform1v5
  libedataserverui-1.2-1 libfstrcmp0 libgc1c2 libjs-dojo-core libjs-dojo-dijit libjs-dojo-dojox libjs-prototype libjs-scriptaculous libmcrypt4
  libmysqlclient18 liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0 libpgm-5.1-0 libphp-phpmailer libpoppler57 libqt5positioning5 libzmq3 mysql-common
  php-cli php-common php-gettext php-pear php-xml php5 php5-cli php5-common php5-gd php5-json php5-mcrypt php5-mysql php5-readline php7.0-cli php7.0-common
  php7.0-json php7.0-opcache php7.0-readline php7.0-xml phpqrcode qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings
  qml-module-ubuntu-onlineaccounts qtdeclarative5-accounts-plugin qtdeclarative5-qtfeedback-plugin qtdeclarative5-qtquick2-plugin
  qtdeclarative5-ubuntu-web-plugin signon-keyring-extension unity-webapps-qml
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  fonts-ancient-scripts indicator-sound pulseaudio pulseaudio-module-x11 pulseaudio-utils rtkit ttf-ancient-fonts unity-control-center
Suggested packages:
  unity-greeter-session-broadcast pavumeter pavucontrol paman paprefs

然后是相关部分:

The following packages will be REMOVED:
  tt-rss
The following NEW packages will be installed:
  fonts-ancient-scripts indicator-sound pulseaudio pulseaudio-module-x11 pulseaudio-utils rtkit ttf-ancient-fonts unity-control-center
0 upgraded, 8 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/15.3 MB of archives.
After this operation, 29.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 222112 files and directories currently installed.)
Removing tt-rss (15.7+git20151123+dfsg-1) ...
/usr/sbin/invoke-rc.d: 600: /usr/sbin/invoke-rc.d: /etc/init.d/10: not found
invoke-rc.d: initscript 10, action "reload" failed.
/usr/sbin/invoke-rc.d: 600: /usr/sbin/invoke-rc.d: /etc/init.d/tt-rss/reconfigure-webserver: not found
invoke-rc.d: initscript tt-rss/reconfigure-webserver, action "reload" failed.
/usr/sbin/invoke-rc.d: 600: /usr/sbin/invoke-rc.d: /etc/init.d/doesn't: not found
invoke-rc.d: initscript doesn't, action "reload" failed.
/usr/sbin/invoke-rc.d: 600: /usr/sbin/invoke-rc.d: /etc/init.d/exist: not found
invoke-rc.d: initscript exist, action "reload" failed.
update-rc.d: error: cannot find a LSB script for tt-rss
dpkg: error processing package tt-rss (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 tt-rss
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@cabin-htpc:/var/cache/debconf#

我试过了

apt-get remove tt-rss
apt-get purge tt-rss
dpkg -r tt-rss
dpkg -P tt-rss

我猜想“重新加载”是卸载程序试图重新加载从未安装的 Web 服务器和 DB 服务器。我只是不知道接下来该怎么做。

答案1

不确定这是否是最好的方法,但我最终选择了: /var/lib/dpkg/info

并找到 tt-rss 安装/删除前和安装/删除后的文件 tt-rss.postrm tt-rss.prerm ,我将其重命名为: tt-rss.postrm.backup tt-rss.prerm.backup

对于那些被禁用的人: dpkg --purge --force-all tt-rss 努力清除并删除 tt-rss。

相关内容