16.04 - bunch of errors during any installation witn any utility apt, apt-get, synaptic, etc - Ask Ubuntu


recently, i've started whole bunch of errors during install. no matter, install:

http://paste.ubuntu.com/23373166/

update:

ok, i've dug point. ran:

sudo /usr/lib/insserv/insserv -f 

and gave me this:

insserv: warning: script 'showfsck' missing lsb tags , overrides insserv: there loop between service reniced , showfsck if stopped insserv:  loop involving service showfsck @ depth 2 insserv:  loop involving service reniced @ depth 1 insserv: stopping showfsck depends on reniced , therefore on system facility `$all' can not true! insserv: can not remove(../rc0.d/k04avahi-daemon): permission denied insserv: can not symlink(../init.d/avahi-daemon, ../rc0.d/k03avahi-daemon): permission denied insserv: can not remove(../rc1.d/k04avahi-daemon): permission denied insserv: can not symlink(../init.d/avahi-daemon, ../rc1.d/k03avahi-daemon): permission denied insserv: can not remove(../rc2.d/s08plymouth): permission denied insserv: can not symlink(../init.d/plymouth, ../rc2.d/s14plymouth): permission denied insserv: can not remove(../rc2.d/s08reniced): permission denied insserv: can not symlink(../init.d/reniced, ../rc2.d/s14reniced): permission denied insserv: can not remove(../rc2.d/s08grub-common): permission denied insserv: can not symlink(../init.d/grub-common, ../rc2.d/s14grub-common): permission denied insserv: can not remove(../rc2.d/s08ondemand): permission denied insserv: can not symlink(../init.d/ondemand, ../rc2.d/s14ondemand): permission denied insserv: can not remove(../rc2.d/s08rc.local): permission denied insserv: can not symlink(../init.d/rc.local, ../rc2.d/s14rc.local): permission denied insserv: can not remove(../rc3.d/s08plymouth): permission denied insserv: can not symlink(../init.d/plymouth, ../rc3.d/s14plymouth): permission denied insserv: can not remove(../rc3.d/s08reniced): permission denied insserv: can not symlink(../init.d/reniced, ../rc3.d/s14reniced): permission denied insserv: can not remove(../rc3.d/s08grub-common): permission denied insserv: can not symlink(../init.d/grub-common, ../rc3.d/s14grub-common): permission denied insserv: can not remove(../rc3.d/s08ondemand): permission denied insserv: can not symlink(../init.d/ondemand, ../rc3.d/s14ondemand): permission denied insserv: can not remove(../rc3.d/s08rc.local): permission denied insserv: can not symlink(../init.d/rc.local, ../rc3.d/s14rc.local): permission denied insserv: can not remove(../rc4.d/s08plymouth): permission denied insserv: can not symlink(../init.d/plymouth, ../rc4.d/s14plymouth): permission denied insserv: can not remove(../rc4.d/s08reniced): permission denied insserv: can not symlink(../init.d/reniced, ../rc4.d/s14reniced): permission denied insserv: can not remove(../rc4.d/s08grub-common): permission denied insserv: can not symlink(../init.d/grub-common, ../rc4.d/s14grub-common): permission denied insserv: can not remove(../rc4.d/s08ondemand): permission denied insserv: can not symlink(../init.d/ondemand, ../rc4.d/s14ondemand): permission denied insserv: can not remove(../rc4.d/s08rc.local): permission denied insserv: can not symlink(../init.d/rc.local, ../rc4.d/s14rc.local): permission denied insserv: can not remove(../rc5.d/s08plymouth): permission denied insserv: can not symlink(../init.d/plymouth, ../rc5.d/s14plymouth): permission denied insserv: can not remove(../rc5.d/s08reniced): permission denied insserv: can not symlink(../init.d/reniced, ../rc5.d/s14reniced): permission denied insserv: can not remove(../rc5.d/s08grub-common): permission denied insserv: can not symlink(../init.d/grub-common, ../rc5.d/s14grub-common): permission denied insserv: can not remove(../rc5.d/s08ondemand): permission denied insserv: can not symlink(../init.d/ondemand, ../rc5.d/s14ondemand): permission denied insserv: can not remove(../rc5.d/s08rc.local): permission denied insserv: can not symlink(../init.d/rc.local, ../rc5.d/s14rc.local): permission denied insserv: can not remove(../rc6.d/k04avahi-daemon): permission denied insserv: can not symlink(../init.d/avahi-daemon, ../rc6.d/k03avahi-daemon): permission denied insserv: fopen(.depend.stop): permission denied 

ok, after of hair pulling , digging deeper, i've found issue:

it appears insserv stumbles upon services, i've moved services insserv complaining temporarily created dir: /etc/d.init /etc/init.d. then, did sudo dpkg --configure -a , voila, worked without errors. ran couple more times until errors disappeared.

after that, did sudo apt-get -f install make sure, , there nothing left.

then started reinstall , reset configs in problematic packages, so, gradually, came following script:

#!/bin/sh  #first, manually move problematic services init.d d.init (i.e.: /etc/d.init/) cd /etc  var_srv=$1 var_pkg=$(dpkg-query -s init.d/$var_srv|egrep -o '^.*\:'|egrep -o '^.*[^\:]')  #to reinstall problematic package: sudo aptitude reinstall $var_pkg #to restore missing configs: sudo apt-get -o dpkg::options::=--force-confmiss --reinstall install $var_pkg  #show both (the backup copy , newly created copy exist): ls d.init/$var_srv init.d/$var_srv #show difference between 2 files (the new , backup): meld d.init/$var_srv init.d/$var_srv sudo rm -vi d.init/$var_srv  #to show files have left processing find d.init/|sort 

during comparison, i've noticed, showfsck's file doesn't have required header i've read on forums. init.d scripts have have following header:

### begin init info # provides: # required-start: # required-stop: # should-start: # should-stop: # x-start-before: # x-stop-after: # default-start: # default-stop: # short-description: # description: ### end init info 

i didn't know values should have left them empty. installation works without errors.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User