1

I am trying to install ConTexT Standalone under LMDE, a Debian GNU/Linux operating system. I followed the system-wide installation instructions step-by-step without any problem. Except for the final step, executing . /opt/context/tex/setuptex, which fails in error:

bash: dirs: +P: invalid number
dirs: usage: dirs [-clpv] [+N] [-N]
"" is not a valid TEXROOT path.
(There is no file "/texmf/tex/plain/base/plain.tex")
provide a proper tex root (like '. setuptex /something/tex')

I also tried with adding the line:

export PATH="$PATH:/opt/context/tex/texmf-linux-64/bin" at the end of /etc/bash.bashrc to no avail. Surely, somebody over here must have ample experience with installing ConTeXt Standalone under Debian...

  • I've never seen that error. Does it also occur when you simply run wget http://minimals.contextgarden.net/setup/first-setup.sh && chmod +x first-setup.sh && ./first-setup.sh && . tex/setuptex – Marco Sep 09 '13 at 16:38
  • @Marco I receive exactly the same error. It looks like setuptex is searching in vain for /texmf/tex/plain/base/plain.tex. – Serge Stroobandt Sep 09 '13 at 18:13
  • Issuing find . -name plain.tex in /opt/context gives ./tex/texmf/tex/plain/base/plain.tex – Serge Stroobandt Sep 09 '13 at 18:45
  • The error message shows a wrong path. It should look for /opt/context/tex/texmf/tex/plain/base/plain.tex instead of /texmf/tex/plain/base/plain.tex. Try . tex/setuptex tex. Which shell are you using? – Marco Sep 09 '13 at 18:50
  • @Marco I tried . tex/setuptex tex and the like before; it does not help. I am using bash. Where would the TEXROOT path be defined? – Serge Stroobandt Sep 09 '13 at 18:56
  • TEXROOT is defined in setuptex and usually determined automatically or constructed from the optional argument. What does . tex/setuptex tex output (you can update your question)? And what does context --version output after setting the path manually on the command line? – Marco Sep 09 '13 at 19:10
  • i was going to comment but requires fifty plus reputation. i tried the same and unfortunately it did not work. although the errors on my system were different than yours, it required other files that i didn't have available. my suggestion, and perhaps this is not what you want, is to install texlive and add PATH=/opt/context/tex/texmf-linux-64/bin/i386-linux:PATH$ to the bashrc file. – doed Sep 09 '13 at 18:22

1 Answers1

1

OK, I solved my problem. I had to adopt and adapt an excerpt of the ConTeXt Standalone instructions for Ubuntu. This is a bit weird, since LMDE is not based on Ubuntu at all. Conversely, Ubuntu sure is derived from Debian.

Here is the complete recipe:

sudo mkdir /opt/context
sudo chown $USER -R /opt/context
cd /opt/context
rsync -av rsync://contextgarden.net/minimals/setup/first-setup.sh .
sh ./first-setup.sh

sudo mkdir /var/cache/context
sudo mkdir /var/cache/context/texmf-cache
sudo chmod 777 /var/cache/context/texmf-cache
nano ./tex/texmf/web2c/texmfcnf.lua

Change the value of TEXMFCACHE from "$SELFAUTOPARENT/texmf-cache" to "/var/cache/context/texmf-cache", save and close.

So far, this was all pretty standard procedure. Now comes the Debian-specific bit.

Open the following file in your favourite editor: sudo nano /etc/bash.bashrc

At the end of this file, add the following lines in this specific order:

export OSFONTDIR=~/.fonts:/usr/share/fonts
export TEXROOT=/opt/context/tex
export PATH="/opt/context/tex/texmf-linux-64/bin:/opt/context/bin:$PATH"

Leave out the "-64" if you are using a 32-bit system. Save and close, then issue the following commands at the prompt:

source /etc/bash.bashrc
sh ./first-setup.sh --modules=all

Check with context --version

mtx-context     | ConTeXt Process Management 0.60
mtx-context     |
mtx-context     | main context file: /opt/context/tex/texmf-context/tex/context/base/context.mkiv
mtx-context     | current version: 2013.09.09 19:45
  • 1
    You are now using source <filename> instead of . <filename>. I don't really know the difference between the two, but I typically use source <..> instead of . <...>. – Aditya Sep 09 '13 at 22:06
  • 2
    @Aditya The dot is specified by POSIX and the most portable way of sourcing a file in any shell. Some shells (e.g. bash and zsh) implement the source command which does the same as the dot. I typically use . <…> instead of source <…>. – Marco Sep 16 '13 at 22:14