This document is based on this instructions: Installing AMC development version on macOS
UPDATE 2018-03-15
Comments were added to this gist with a method to install AMC with Homebrew. To choose your best installation option, please read them before installation.
XQuartz
: OK!MacPorts
: OK!Linux Libertine font
: download, unzip, and move the OTF files into "/Library/Fonts" folder.DejaVu font family
: not needed (japanese documentation generation).
-
Create a local folder for MacPorts.
mkdir -p ~/nix
-
Edit the file "/opt/local/etc/macports/sources.conf" with
nano
orvim
:nano /opt/local/etc/macports/sources.conf or vim /opt/local/etc/macports/sources.conf
-
and add the line
"file://...."
:file:///Users/slopes/nix/macports rsync://rsync.macports.org/release/tarballs/ports.tar [default]
-
Download "http://project.auto-multiple-choice.net/attachments/download/1148" and unzip it into
~/nix
.curl -o amc.zip "http://project.auto-multiple-choice.net/attachments/download/1148" unzip amc.zip macports/* -d ~/nix/
-
Uninstall any previous installation of AMC:
sudo port uninstall auto-multiple-choice
-
Generate the index of our local MacPorts folder.
cd ~/nix/macports portindex
-
Install the pdftk port.(not needed with an external TeX installation)sudo port install pdftk
-
Edit the
/opt/local/etc/macports/macports.conf
file to add the following line:binpath /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin
-
Increase the limit of max number of open files:
ulimit -n 2048
-
Install dblatex.
sudo port install dblatex -latex
-
Install AMC.
sudo port install auto-multiple-choice-devel -latex
NOTE: when installing auto-multiple-choice
, there was a dependency error. The problem seems to me to be is this:
https://lists.macosforge.org/pipermail/macports-users/2016-April/040851.html
There, I suggested that we might be opening one (or more) file descriptor(s) for each dependency to be installed, and then by the time we want to fetch the files, we don't have any remaining file descriptors to do so.
The workaround suggested is to manually install one (or more) of the dependencies (listed on the "Dependencies to be installed " line) first.
Increasing the limit of max number of open files is a much better solution, so go for it:
ulimit -n 2048
And now it works!
sudo port install auto-multiple-choice-devel -latex
Those new instructions were written in the beggining of January 2017.
See http://project.auto-multiple-choice.net/boards/1/topics/4866?r=4894#message-4894
Also, i did a
sudo port uninstall installed
instead ofsudo port uninstall auto-multiple-choice
to start a fresh installation of every package.