Mathematica via distrobox?

First time using distrobox. I have a license to Mathematica and am trying to install it on Bazzite. It works fine on my MacBook. Since there is no flatpak, I created a distrobox:
$ distrobox create --image fedora:40 --name mathematica --nvidia
$ distrobox create --image fedora:40 --name mathematica --nvidia
Entering the distrobox, I installed Mathematica to its default locations in /usr/local/bin/:
$ sudo sh Downloads/Mathematica_14.0.0_BNDL_LINUX.sh
$ sudo sh Downloads/Mathematica_14.0.0_BNDL_LINUX.sh
I then exported one of the symlinked entries in /usr/local/bin:
$ distrobox-export --app /usr/local/bin/mathematica
Error: cannot find any desktop files.
Error: trying to export a non-installed application.

$ distrobox-export --bin /usr/local/bin/mathematica
/usr/local/bin/mathematica from mathematica exported successfully in /home/kfarmer/.local/bin.
OK!
$ distrobox-export --app /usr/local/bin/mathematica
Error: cannot find any desktop files.
Error: trying to export a non-installed application.

$ distrobox-export --bin /usr/local/bin/mathematica
/usr/local/bin/mathematica from mathematica exported successfully in /home/kfarmer/.local/bin.
OK!
But neither from the host OS nor from within the distrobox am I able to run it:
[host or distrobox]
$ mathematica
/usr/local/Wolfram/Mathematica/14.0/SystemFiles/FrontEnd/Binaries/Linux-x86-64/Mathematica: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory
[host or distrobox]
$ mathematica
/usr/local/Wolfram/Mathematica/14.0/SystemFiles/FrontEnd/Binaries/Linux-x86-64/Mathematica: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory
I've not installed mathematica except on MacOS and Windows, so I don't know if this is expected: Do I need to install other bits (which would seem odd for Wolfram to leave out in their installer)? or am I running into an issue in Fedora (also seems highly unlikely)? I note that nixpkgs has an entry for Mathematica 14.0. If I can't get it working here, then I'll probably end up switching to NixOS to gain access to that packager tonight when I blow away the system drive while migrating my mobo to full UEFI. Regardless, knowing whether/if I missed something above would be helpful.
8 Replies
Kasher_CS
Kasher_CS7mo ago
You need to change your LD library path
Potajito
Potajito7mo ago
Maybe worth it to do it on an arch distrobox?
Oddr
OddrOP7mo ago
can you elaborate?
Kasher_CS
Kasher_CS7mo ago
It's a variable for libraries You probably have libs in/usr/local
Oddr
OddrOP7mo ago
One thing I think it's safe to say: my mobo is too old to support UEFI installations -- neither Nix nor Bazzite. Couldn't even get it to take a BIOS update. I'll spelunk on the libraries
M2
M27mo ago
You can install into your homedir
Oddr
OddrOP7mo ago
I ended up just doing a plain install into its default (/usr/local and /usr/local/bin). Works well (it better, given that's the approach the installer presumes), at least in a way that I can reason about at this stage, even if not really the best approach.
Want results from more Discord servers?
Add your server