This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to

TeXLive 2009 Install On FreeBSD

TeXLive2009 doesnot support FreeBSD so we have to build it from source and install TeXLive to global system tree so that all users on the system can use it. The build is architect-dependent because we dont' want to redistribute the result.

The directory structure during/after installation is as below

  1. /home/texlive2009: TeXLive will be installed here
  2. /home/texlive2009-dist: the mount point for TeXLive 2009 iso file, described in the Section "Download and Mount iso file"
  3. /home/pi/projects/texlive2009: the working directory (contains TeXLive source)
  4. /home/pi/.texlive2009/: local TeXLive files

(My username is pi. You may replace pi by any username on your system.)


System requirements

  1. bash shell (sorry, I haven't learnt /bin/sh yet)
  2. gcc
  3. gmake (yes, you must use gmake)
  4. libpng (optional)
  5. libgd (optional)
  6. libicu (optional)

Please refer to FreeBD documents to install those packages.

Download TeXLive's source

TeXLive's document says that you can download the source file using rsync (this allows you to get an update version). But you can always download faster by using source URL as below.

1 $ cd /home/pi/projects/texlive2009
2 $ wget
3 $ tar xfvz ./texlive-20091107-source.tar.xz
4 $   # you would get the directory ./texlive-20091107-source

Download and mount ISO file

You're going to download a huge file from CTAN server. Please patient and (if possible) read the instructions at

In this guide, I suggest you to use the URL After entering this site you will be redirected to a nearest mirror. For example, my nearest CTAN link is from Hong Kong. Let's download it by wget

 1 $ cd /home/pi/projects/[email protected]
 2 $ wget
 3 $   # The above file's size is about 1.4GB. You will have to wait for quite long time
 4 $   # Now you should download md5 file and test if your download is alright
 5 $ wget
 6 $   # Test your downloaded files now
 7 $ md5 ./texlive2009-20091107.iso.xz
 8 $   # if the result is as same as the contents of the file ./texlive2009-20091107.iso.xz.md5
 9 $   # you can go to the next step to extract the iso file (file's size is about 2.4GB)
10 $ tar xfvz texlive2009-20091107.iso.xz
11 $   #
12 $   # now you need the wheel group, or root permission to mount the iso file.
13 $   # Let's switch to root shell
14 $ su
15 $ mdconfig -t vnode -f /home/pi/projects/texlive2009/texlive2009-20091107.iso -a -u 10
16 $   # You would have the device /dev/md10. You may choose any free number
17 $   # ("free" means that /dev/md10 is unused)
18 $   # You will also create the directory /home/texlive2009-dist/ for iso mounting
19 $ mkdir /home/texlive2009-dist/
20 $ mount -t cd9660 /dev/md10 /home/texlive2009-dist
21 $   # you need to add some commands to your boot scripts so that the ISO file will
22 $   # be mounted each time your system is boot up.
23 $   # The best way is to put your script in /usr/local/etc/rc.d/


Options for ./configure

To get a full list of options for ./configure, please try ./configure --help

1 $ cd /home/pi/projects/texlive2009/texlive-20091107-source
2 $ ./configure --help

After many try-and-errors I finally found a suitable configuration for my system. My file is attached to this wiki (ICY_CONF). Please download that file and edit +instead o+f copying my description which is too messy for ./configure.

  1. DONOT copy and paste the contents below without any modification.
  2. There is a script Build in TeXLive source directory. But it may cause troubles.
 1 TL_MAKE=gmake                        # you have to use gmake to build TeXLive
 3 --with-tex-banner="ICY 2009"         # your banner which is normally "TeXLive 2009" 
 4 --prefix="/home/texlive2009/"        # the root directory. this is where you install TeXLive to
 5 --enable-shared                      # the binaries are shareable, or architect-dependent.
 6                                      # If you want to redistribute your build, use --disable-shared
 7 --disable-largefile                  # Do you need to typeset some large files?
 8 --disable-native-texlive-build       # Please read document in ./configure --help
 9 --with-system-icu                    # Use this if you have `icu` package installed
10 --with-system-libpng                 # Use this if you have `png` package installed
11 --with-system-gd                     # Use this if you have `gd` package installed
12                                      # Note that you can not use --with-system-* if you --disable-shared
13 --with-libpng-libdir="/usr/local/lib/" 
14 --with-icu-libdir="/usr/local/lib/" 
15 --with-gd-libdir="/usr/local/lib/" 
16 --with-icu-includes="/usr/local/include/" 
17 --with-gd-includes="/usr/local/include/" 
18 --with-libpng-includes="/usr/local/include/libpng/" 
19 --without-x                          # delete this line if you want to use some X tools from TeXLive
20 --without-mf-x-toolkit
21 --enable-web2c                       # Without this you will not get any tex compilers
22 --disable-web-progs                  # web-programs is rarely used...
23 --disable-cjkutils                   # I should never use CJK documents
24 --disable-dvisvgm                    # I disable this because it causes problem on my system
25 --disable-dependency-tracking        # faster build -- I believe that :(
26 --disable-tpic2pdftex                 --disable-dviljk   --disable-musixflx --disable-tex4htk
27 --disable-vlna     --disable-xindy    --disable-detex    --disable-devnag   --enable-tex
28 --disable-dvi2tty  --disable-dvipng   --disable-bibtexu  --disable-afm2pl   --enable-etex     
29 --disable-dtl      --disable-seetexk  --disable-dvipos   --disable-debug    --enable-xetex
30 --disable-gsftopk  --disable-timing   --disable-lcdf-typetools              --disable-pdfopen
31 --disable-debug    --disable-lacheck  --disable-aleph    --disable-dvisvgm  --enable-pdftex

Build with gmake

1 $ bash # you are running in Bash
2 $ cd /home/pi/projects/texlive2009
3 $ cd ./texlive-20091107-source
4 $ source /path/to/ICY_CONF
5 $ eval ./configure $TL_CONFIGURE_ARGS # we use bash + eval
6 $ gmake                               # gmake, not make
7 $ gmake world                         # install it

During the build process (after you type gmake), you may encounter the problem with icu library. (Though you have specify --with-system-icu .) If that is the case please switch to icu directory then build icu separately

1 $ cd ./libs/icu/icu-build
2 $ gmake
3 $ cd ../../../   # now you're in ./texlive-20091107-source
4 $ gmake          # continue to build TeXLive
5 $ gmake world    # install to /home/texlive2009/

Configure TeX system

Global configuration

Create a file named /home/texlive2009/texmf.cnf whose contents are below. This file is very important. It's almost similiar to the file /home/texlive2009/texmf/web2c/texmf.cnf but it will loaded lastly. If you want to know the means of the variables in texmf.cnf please read /home/texlive2009/texmf/web2c/texmf.cnf (which is very comprehensive though it is very messy and hard-to-read)

 1 TEXLIVE        = /home/texlive2009
 2 TEXMFMAIN      = $TEXLIVE/texmf
 3 TEXMFLOCAL     = $TEXLIVE/texmf-local
 4 TEXMFSYSVAR    = $TEXLIVE/texmf-var
 6 TEXLIVEDIST    = /home/texlive2009-dist
 7 TEXMFDIST      = {!!$TEXMFMAIN,!!$TEXLIVE/texmf-dist,!!$TEXLIVEDIST/texmf,!!$TEXLIVEDIST/texmf-dist}
 8 TEXMFCNF       = {$TEXMFDIST,$TEXMFSYSCONFIG}{,/{-local,}/web2c}

Local configuration

As a normal user in the system, your TeX configuration files are stored in $HOME/.texlive2009/. If you want to add some fonts' maps, please use the file /home/texlive2009-dist/texmf/web2c/updmap.cfg. Because that file is unwritable, you should copy it to the directory $HOME/.texlive2009/texmf/web2c/updmap.cfg then add your own map-lines.

File database. Test

Update as root

1 $ texhash /home/texlive2009
2 $ texhash /home/texlive2009-dist # note: this directory is unwritable. See Final Notes

Update as normal user

1 $ updmap
2 $ texhash /home/pi/.texlive2009

Test your installation

The last line must be seen otherwise your installation failed.

1 $ kpsewhich -a updmap.cfg
2 /home/pi/.texlive2009/texmf-config/web2c/updmap.cfg
3 /home/texlive2009-dist/texmf/web2c/updmap.cfg

Final notes

As mentioned in the previous steps, /home/texlive2009-dist is unwritable so you can't run texhash for that directory. In fact, I tricked the TeXLive 2009 as below

  1. mount TeXLive 2009 iso file to the directory /home/texlive2009-original
  2. copy all files, except for the binary files, in /home/texlive2009-original/ to /home/texlive2009-small. Here binary files stands for any files in the bin directory (you won't find FreeBSD in such ./bin so you have to read this document)
  3. run texhash for /home/texlive2009-small
  4. create new ISO file from /home/texlive2009-small
  5. now I have 1.7GB instead of 2.4GB
  6. use new iso instead of orignal iso file

ICY_CONF - TL_CONFIGURE_ARGS (1.1 kB) , 30-11-2009 03:47