How to install smlnj on arch linux?
I used to be on Ubuntu and it was easy to install smlnj using
apt-get install smlnj
but now I have switched to Arch and am having a hard time installing smlnj.
I tried to find the smlnj package via yaourt
but I couldn't find it. Then I tried to install it through the steps given in the official site by downloading the tar file. I followed the steps below and extracted the tar
file to /usr/local/sml
and then compiled with the command
config/install.sh
.
After doing all this, I tried to run sml but was not successful. I tried to set an environment variable but again was not successful.
Please tell me if I am missing any steps or am doing it wrong. What's the correct way to install smlnj on Arch Linux?
source to share
Update: As Alexander (xyproto) points out, pacman -S smlnj
should work again when SML / NJ is in the [multilib] repository. The solution below will still work, but credit for easier installation should go to it. :-)
Before: It looks like the package became unavailable for x86_64 in February 2017, but it looks like this shouldn't have happened. I asked Alexander who maintains the package at [community].
The AUR does not contain the smlnj package because it overlaps with the official packages against the AUR policy, unless the AUR package is compiled with some customization that is clearly visible in the package name.
You can still create an Arch package and install it by finding the PKGBUILD and accompanying files: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/smlnj (or by cloning the git repo below with with these four files in it):
~ $ git clone https://github.com/sshine/smlnj-arch.git
~ $ cd smlnj-arch
~/smlnj-arch $ makepkg
~/smlnj-arch $ sudo pacman -U smlnj-110.80-3-x86_64.pkg.tar.xz
source to share