I've switched to Ubuntu and the following code does not run, although it does on Mac OS. I have attached a screenshot with the logs.
This is the code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\begin{tabular}{ l | c | r }
\sffamily
& A & B \\ \hline
1 & $\tikzmarknode{a11}{r_{1A}}$~ & ~$\tikzmarknode{a12}{r_{1B}}$ \\ \hline
2 & $\tikzmarknode{a21}{r_{2A}}$~ & ~$\tikzmarknode{a22}{r_{BA}}$ \\ \hline
\end{tabular}
\begin{tikzpicture}[overlay,remember picture]
\draw[stealth-stealth,blue] (a11.north east) -- (a12.north west)
node[midway,above,scale=0.4,black] (dAB) {$d_{AB}$};
\draw[-stealth,blue] (a21.south east) -- (a22.south west);
\draw[-stealth,blue] (dAB.south) to[out=0,in=80] (dAB.south|-a22);
\draw[stealth-stealth] (a11.east) -- (a21.east)
node[pos=0.5,above right,scale=0.4,black] (d12) {$d_{12}$};
\draw[-stealth] (d12.north) to[out=0,in=180] ([yshift=-1ex]a12.west);
\end{tikzpicture}
\end{document}

\tikzmarknodeis a newly added command, out-of-date distributions may not have it. – Apr 13 '19 at 04:56tlmgr update tikzmark– NaveganTeX Apr 13 '19 at 05:20If you're interested in helping to pretest the new release (when pretests are available), please read http://tug.org/texlive/pretest.html. Otherwise, just wait, and the new release will be ready in due time. tlmgr: package repository http://ctan.dcc.uchile.cl/systems/texlive/tlnet (verified) tlmgr: no updates available
– NaveganTeX Apr 13 '19 at 05:20