Page 1 of 1

Ubuntu 16.04: error while installing - update-rc.d failed

Posted: Mon Nov 11, 2019 11:42 am
by mat2
Hello,
Yesterday I tried to install fahclient on Ubuntu 16.04. It failed with the following error:

Code: Select all

Setting up fahclient:amd64 (7.5.1) ...
update-rc.d: error: no runlevel symlinks to modify, aborting!
dpkg: error processing package fahclient:amd64 (--install):
 subprocess installed post-installation script returned error exit status 1
There had been a question (via debconf) whether fahclient should run by default and I had answered no.

The problem was AFAIK caused by the following snippet in the postinst script:

Code: Select all

            if [ -x insserv ]; then
                insserv -r FAHClient
            else
                update-rc.d FAHClient disable
            fi
Apparently,

Code: Select all

update-rc.d FAHClient disable
fails when there are no symlinks in /etc/rc*.d and returns a non-zero exit code. Because the script is executed by "/bin/bash -e" , this causes the postinst script to fail.
One solution would be to modify the line so:

Code: Select all

update-rc.d FAHClient disable || true 
I think that some other update-rc.d invocations in postinst and postrm scripts should be modified in this way.

Re: Ubuntu 16.04: error while installing - update-rc.d faile

Posted: Mon Nov 11, 2019 6:05 pm
by JimF
I have installed FAH 7.5.1 several times on Ubuntu 16.04 without problems. The only limitation is that you have to have the various updates enabled in Ubuntu "Software & Updates", since it downloads some components during installation. I never bothered to track down which updates were necessary, I just enable them all.

Re: Ubuntu 16.04: error while installing - update-rc.d faile

Posted: Mon Nov 11, 2019 9:07 pm
by MeeLee
I don't know about 16.04, but on 18.04 all you need is the fah .deb file. It will automatically install the versions of dependencies it needs.
You just have to make sure you install the deb file including the dependencies (on apt, it'd be: apt-get -f install fah***.deb)