Message Boards Message Boards

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

Posted 4 years ago

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
    apt -y update
    
  • 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-13.1.0.sh
    
  • as Mathematica installs 32-bit binaries, it may have overlooked some following dependencies, the 64-bit versions of these libraries were already on my system and may have been taken for granted (although it might have been installed as a dependency for something else...) As new releases come, this may resolve itself, you'll just have to watch the error messages and act accordingly...

    apt install libatomic1:armhf libgl1: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 and libgl1 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 BY: Ronald Antony
2 Replies
Posted 2 years ago

For installing Mathematica on Raspberry Pi running Ubuntu 22.04: you need to install gfortran first, then follow the steps of this article…

POSTED BY: Steve Sun
Posted 4 years ago

I am glad you got this working.

POSTED BY: David Morton
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