sander2
Posts: 60
Joined: Wed Jul 04, 2012 2:22 pm

inssserv: warning: script 'mathkernel' missing LSB tags

Sat Feb 01, 2014 1:27 pm

If you do an update/upgrade, and get
insserv: warning: script 'mathkernel' missing LSB tags and overrides
here's some info on that:

mathkernel means /etc/init.d/mathkernel, which is provided by the package wolfram-engine. According to jcfp on http://forums.sabnzbd.org/viewtopic.php ... 190#p92180 , that /etc/init.d/mathkernel is not how it should be on debian and thus raspbian:
The interwebs claim mathematica gets installed by default on recent raspbian images, so I took a quick look at their init script only to find this mess <snip>
...including the complete lack of lsb headers or any other attempt at debian policy compliance, the casual use of 'kill -9' to stop a program and the extra ":" at the end. The wolfram-engine package doesn't even try to hook up the init script (then why is it there in the first place?!); if it did, its own install would probably fail. Instead, as you have seen, its mere presence causes insserv to fail (and thus failure of unrelated packages). Please file a bug report with raspbian and/or wolfram! A cluster**** like this would be release-critical on debian.
So to certainly get rid of "insserv: warning: script 'mathkernel' missing LSB tags and overrides", you can remove wolfram-engine:

Code: Select all

sudo apt-get remove wolfram-engine
That will also save you 450 MB diskspace.

If you like hacks and/or need Mathematica wolfram-engine, you can use Rustus' hack from http://www.forum-raspberrypi.de/Thread- ... -overrides: in /etc/init.d/mathkernel after #!/bin/sh add:

Code: Select all

### BEGIN INIT INFO
# Provides:          mathkernel
# Required-Start:    $local_fs 
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: mathkernel
### END INIT INFO
That worked for me, although I don't know if it has any other impact.
Last edited by sander2 on Sun Feb 09, 2014 11:21 pm, edited 1 time in total.

User avatar
jojopi
Posts: 3007
Joined: Tue Oct 11, 2011 8:38 pm

Re: inssserv: warning: script 'mathkernel' missing LSB tags

Sat Feb 01, 2014 3:06 pm

The ":" at the end is not extra. It is there to ensure a successful return status. Lots of Debian scripts end exactly like that.

Adding the "INIT INFO" block is the correct fix, as recommended in https://wiki.debian.org/LSBInitScripts. However, I would argue the bug is really in insserv. If a script does not say when the service should be started and stopped, then the inference should be that it does not matter, not that it conflicts with everything.

The Debian Policy Manual does not even appear to mandate LSB tags in init scripts: http://www.debian.org/doc/debian-policy ... s-sysvinit. And it is unrealistic to expect third-party packages to adopt your best practices.

pjac
Posts: 11
Joined: Tue Apr 17, 2012 3:41 pm

Re: inssserv: warning: script 'mathkernel' missing LSB tags

Sun Feb 09, 2014 11:05 pm

Thanks for posting this - I've gone for the simple option you suggested,

Code: Select all

sudo apt-get remove wolfram-engine

chunkking
Posts: 2
Joined: Fri Jan 24, 2014 1:57 pm

Re: inssserv: warning: script 'mathkernel' missing LSB tags

Wed May 28, 2014 1:16 pm

Wow, nearly 2 years late to the game. But I just set up a Pi with a 1-27-2014 version of wheezy.
While installing tightvncserver, I got the inssserv warning mentioned here. I suspected the solution would be to add the headers as mentioned elsewhere, but wanted to try the old sudo apt-get dist-upgrade first.

I'm running on an 8gig SD card - but haven't yet expanded the file system.
During the upgrade, while "unpacking the wolfram engine" I got another warning about "not enough memory on the device" and dpkg exited with an error "1".

Since I have other interests for the Pi at this time, I elected to use the "sudo apt-get purge wolfram..." solution also mentiioned elsewhere in this post.
Thank you all for your contributions!

damnhipster
Posts: 1
Joined: Sun Aug 31, 2014 1:19 pm

Re: inssserv: warning: script 'mathkernel' missing LSB tags

Sun Aug 31, 2014 1:21 pm

Thanks chunkking, I was about to try upgrading the distro just now and I've chosen to remove Wolphram Alpha as well.

Return to “Wolfram Language”

Who is online

Users browsing this forum: No registered users and 1 guest