Message Boards Message Boards

GROUPS:

Installing Mathematica under 64-bit Kali Linux on a Raspberry Pi

Posted 8 months ago
1816 Views
|
1 Reply
|
2 Total Likes
|

Since, from what I understand the bundle license for personal use of Mathematica is tied to the Raspberry hardware and not to the Raspian OS, and since I prefer the 64-bit version of Kali Linux to Raspian, here the steps I took to get Mathematica working on my RasPi under Kali Linux:

  • In case you haven’t done so, make an attempt of making your installation a 32/64-bit multi-architecture system:

    dpkg --add-architecture armhf
    
  • download the Raspberry Pi Mathematica Installer from Wolfram Research

    wget https://wolfr.am/wolfram-engine-raspi-install
    
  • run whatever script the above link downloads, currently that’s: (and this may take a while, as it downloads the bulk of the install)

    bash ./install-wolfram-engine-12.1.1.sh
    
  • as long as Mathematica installs 32-bit binaries, it seems to have overlooked the following dependency, the 64-bit version of the library was already on my system (although it might have been installed as a dependency for something else...)

    apt install libatomic1:armhf
    
  • Mathematica requires rather questionable access to /dev/vchiq and /dev/fb0 the latter of which is already group video with group read-write access. For /dev/vchiq we need to do this manually. Not sure I’m happy about the security implications of this… (In case future versions of Kali have different default permissions, commented out the otherwise required steps for /dev/fb0 )

    #chgrp video /dev/fb0
    chgrp video /dev/vchiq
    #chmod g+rw /dev/fb0
    chmod g+rw /dev/vchiq
    
  • for each non-root user who wants to successfully use Mathematica, the following is required:

    sudo usermod -a -G video $(whoami)
    

That should do it, things work, etc.

There are however a few issues, to summarize:

1) I’m not sure how comfortable anyone should be with non-privileged users getting access to /dev/fb0 and /dev/vchiq just to run Mathematica. If access to such resources is required, then that should be something handled in a privileged task and not require giving users wholesale access to devices.

2) As pointed out elsewhere in this forum, Mathematica failing with a seemingly totally unrelated licensing failure when access to these devices isn’t granted, is less than ideal. Unless one happens to stumble across this thread here On Raspberry Pi 2, how do I get beyond the 'Product Activation' dialog? good luck figuring out what’s the actual problem...

3) The install script, while otherwise rather good at installing dependencies, missed the dependency on libatomic1 which consequently had to be installed manually, which is only in so far a problem as it’s another failure point, and, in case of a future de-installation of Mathematica, will linger as ghost, unless equally manually removed.

4) Of course, we’d all be even happier, if we could finally see an arm64 rather than the armhf version of Mathematica, so the higher-end Raspberry Pi can effectively use their CPU and RAM most efficiently. But this is a good bridge solution for the time being, at least I won’t have to run a 32-bit kernel or OS anymore.

Anyway, enjoy! Hope this is helpful for someone...

Posted 8 months ago

I am glad you got this working.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract