如何从 ubuntu 卸载 plex

如何从 ubuntu 卸载 plex

我发现无法从我的 Ubuntu 系统中完全删除 plex,我收到以下错误:

davewold@ubuntuhome:~$ sudo aptitude purge plexmediaserver
[sudo] password for davewold: 
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
Ignoring unknown parameter "announce version"
The following packages will be REMOVED:  
  libavahi-core7{u} libavahi-gobject0{u} plexmediaserver{p} 
0 packages upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 409 kB will be freed.
Do you want to continue? [Y/n/?] y
(Reading database ... 204286 files and directories currently installed.)
Removing libavahi-core7:amd64 (0.6.31-4ubuntu1) ...
Removing libavahi-gobject0:amd64 (0.6.31-4ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
(Reading database ... 204272 files and directories currently installed.)
Removing plexmediaserver (0.9.11.7.803-87d0708-debian) ...
Plex Media Server is not running (no process found)...
update-rc.d: /etc/init.d/plexmediaserver exists during rc.d purge (use -f to force)
dpkg: error processing package plexmediaserver (--purge):
 subprocess installed pre-removal script returned error exit status 1
Errors were encountered while processing:
 plexmediaserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:

答案1

尝试强制删除,sudo aptitude -f purge plexmediaserver如果不奏效,请尝试以下命令:

sudo rm -f /etc/init.d/plexmediaserver
sudo dpkg --purge --force-all plexmediaserver

答案2

虽然这是在黑暗中拍摄,但有时它对我有帮助。

重新安装该包,然后尝试sudo apt-get --purge remove <package>

还要确保没有与此包相关的进程正在运行。

如果这不管用,那就用困难的方法吧。

mv /var/lib/dpkg/info/<package>.* /tmp/
dpkg --remove --force-remove-reinstreq <package>

答案3

cd /etc/init.d/

删除 plex init 条目

sudo mv plexmediaserver plexmediaserver.dead

从 update-rc 中删除它

sudo update-rc.d -f plexmediaserver remove

卸载

sudo apt-get --purge remove -f plexmediaserver

删除 init.d 条目

sudo rm -rf plexmediaserver.dead

相关内容