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

Moderators: Site Moderators, FAHC Science Team

Post Reply
mat2
Posts: 9
Joined: Tue Mar 17, 2015 7:23 pm

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

Post 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.
JimF
Posts: 651
Joined: Thu Jan 21, 2010 2:03 pm

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

Post 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.
MeeLee
Posts: 1339
Joined: Tue Feb 19, 2019 10:16 pm

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

Post 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)
Post Reply