I tried installing Plex Media Server on Ubuntu 15.04 but it didn't work because of the migration to systemd from Upstart. Unfortunately I can't seem to be able to uninstall it now either, since the callbacks error out and prevent dpkg from uninstalling the package. Is there a way to forcibly uninstall the package?
Here's what happens when I attempt to uninstall:
leslie@ubuntu:~$ sudo dpkg --remove plexmediaserver
(Reading database ... 191366 files and directories currently installed.)
Removing plexmediaserver (0.9.12.0.1071-7b11cfc) ...
Synchronizing state for plexmediaserver.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d plexmediaserver defaults
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'plexmediaserver' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `plexmediaserver'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `plexmediaserver'
Executing /usr/sbin/update-rc.d plexmediaserver disable
update-rc.d: error: plexmediaserver Default-Start contains no runlevels, aborting.
dpkg: error processing package plexmediaserver (--remove):
subprocess installed pre-removal script returned error exit status 1
OK
Synchronizing state for plexmediaserver.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d plexmediaserver defaults
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
insserv: warning: script 'plexmediaserver' missing LSB tags and overrides
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `plexmediaserver'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `plexmediaserver'
Executing /usr/sbin/update-rc.d plexmediaserver enable
update-rc.d: error: plexmediaserver Default-Start contains no runlevels, aborting.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
plexmediaserver
/var/lib/dpkg/info/plexmediaserver.prerm:
#!/bin/sh
set -e
if [ `cat /etc/issue|cut -d"." -f1|sed 's/[^0-9]*//g'` -gt 14 ];
then
systemctl stop plexmediaserver.service
systemctl disable plexmediaserver.service
else
if [ -e "/etc/init/plexmediaserver.conf" ]; then
stop plexmediaserver || :
fi
fi
/var/lib/dpkg/info/plexmediaserver.postrm:
#!/bin/sh
set -e
# Automatically added by dh_makeshlibs
if [ "$1" = "remove" ]; then
ldconfig
fi
# End automatically added section
/var/lib/dpkg/info/plexmediaserver.prerm
and/var/lib/dpkg/info/plexmediaserver.postrm
. Try commenting out any calls toupdate-rc.d
in them. – muru May 04 '15 at 19:16systemctl disable
. – muru May 04 '15 at 19:27