6
$\begingroup$

I have been trying to install Mathematica with Wolfram script on Manjaro Linux for the past 2 days with little success. I can install Mathematica itself using the .sh file but when the setup asks me if I want to install WolframScript and I say yes, I get the following error:

NOTE: Unable to determine the package manager used by the system--skipping the optional install of WolframScript system integration. Installer packages in the RPM and DEB formats have been left in "/usr/local/Wolfram/Mathematica/12.0/SystemFiles/Installation". Consult your system documentation on how such packages might be installed.

This error is due to the fact that Manjaro uses pacman as package manager but the WolframScript package is only available in .deb or .rpm format.

I tried installing Mathematica from the AUR but then I got this error:

ERROR: Mathematica_12.0.0_LINUX.sh was not found in the build directory and is not a URL. Error downloading sources: mathematica.

I have no idea how to proceed from here. Can someone explain to me how to install Mathematica on a distro that uses the pacman package manager?

$\endgroup$
6
$\begingroup$

The mathematica PKGBUILD in the AUR requires the installer to be placed in the same directory as the PKGBUILD:

## To build this package you need to place the mathematica-installer into your
## startdir If you don't own the installer you can download a trial version at
## http://www.wolfram.com/mathematica/trial

Alternatively, you can extract the data archive from the .deb file and then extract the WolframScript files from that (this is what the PKGBUILD does):

bsdtar -xf wolframscript_1.2.0+2019040701_amd64.deb data.tar.xz
tar -xf data.tar.xz

Then copy the files to the appropriate place on your filesystem.

$\endgroup$
1
  • $\begingroup$ How do I know where is the PKGBUILD? $\endgroup$
    – Kirtpole
    Jun 2 '20 at 23:49
3
$\begingroup$

I tested the following method in arch linux. It works with Mathematica 12.2 + Arch Linux 5.10.13-arch1-2.

To get around the problem, try AUR helper. I use yay.

First, find out the build directory of yay.

yay -P -g

The output includes "buildDir":"/home/myname/.cache/yay"

Then download Mathematica_12.2.0_LINUX.sh from Wolfram portal. Put the file under "/home/myname/.cache/yay/mathematica".

Finally, run

yay -S mathematica

If you failed at the first try, try a second time.

$\endgroup$
1
$\begingroup$

I used a different route than what @ngenisis suggests. I used debtab from the AUR. It is a script that converts deb packages to arch/manjaro.

You may run into an error saying that

error: failed to commit transaction (conflicting files)
wolframscript: /usr/share/man/man1/wolframscript.1 exists in filesystem

But you just find that file and delete it. This happens if you used a different install procedure and then uninstalled mathematica.

What you do is go to there the .sh installer told you the wolframscript.deb file is and run the command:

sudo debtap wolframscript.deb

Make sure to write the proper name for the script file! Do not copy and paste the above command like that. It will ask you some questions but just hit enter until the command is finished. You will end up with a file with an extension .tar.zst.

That is the installer file for manjaro. You then install it with:

sudo pacman -U the-new-file.tar.zst
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.