If I install
texlive-full on Ubuntu 12.04 using
apt-get will I have the stable and checked version? or is there any security risk?
should I avoid installing it?
If I install
I would like to answer this question in light of my personal experience.
- For many years, I have been using the default installation of LaTeX which comes with Ubuntu, and even after being an avid LaTeX user, I did not face any appreciable problem.
- In my home machine I am running Ubuntu 12.04 and in my office machine Ubuntu 13.04, both have LaTeX installed using the default Ubuntu installation as outlined below.
- When installing LaTeX, you will want to use the command,
sudo apt-get install texlive. You may get tempted to use
sudo apt-get install texlive-full, but this will want to install so many extra (language) packages, most which will be unnecessary for your purpose.
- When the above installation is complete, you will want to install the necessary language and font packages applicable to you. The commands will be in the form of
sudo apt-get install texlive-lang-dutch(put your language name here. If unsure, issue command
sudo apt-get install texlive-fullto see which packages are selected, pick-up your necessary name(s), answer `No' to installation, and then go for installation of that particular package).
- You may also want to install IBus (
sudo apt-get install ibus), AUCTeX (
sudo apt-get install auctex), and Emacs (
sudo apt-get install emacs), should you feel the need and/or inspiration to use any of these.
- Installing RCS (
sudo apt-get install rcs rcs-latex), will help you maintain the versions of your LaTeX documents.
- Should you need a package in future, please use the command
apt-cache search <package/style name>to find the package and then use the
sudo apt-get installcommand to install the package. See this post for details and other options.
- In some rare cases, you will fail to find some package in the above method outlined in the last step. In that case, please visit CTAN, use the Search feature to locate the package, download the
.zipfile, unzip it (
unzip <zip file name>), read the README or INSTALL file to find out any additional steps before installation, and the copy the complete folder to
sudo cp -vr <folder name> /usr/local/share/texmf/tex/latex/). You may need to create the parent directories if necessary. (
mkdircommand). After this, run
sudo mktexlsrto update the ls-R databases. Without the last step, LaTeX will fail to find the package.
- In the above discussion, I assumed that you will want to run LaTeX from command line, like me. Should you decide to install and use any of the GUI front ends, please see this post for further instructions. I think that Emacs with AUCTeX are more that sufficient. (This setup has also been mentioned in the aforementioned post.)
- I understand that as indicated in the above comment from Heiko Oberdiek, you have the moderate or less than moderate (italicized part is my personal opinion) risk of using an old version. But IMHO and based on my experience over more than a decade, the risks are very minimal. But still if you want to take this route, please use the post as indicated in the comment. But unless you are a very matured Linux user (believe me, I am), I would not suggest this path. No offense intended. Setting all the
$PATHand environment variables may not be what you are looking for. And occasional conflicts in dependencies may mean some extra (non-LaTeX) hassles for you.
I will add a different point of view.
Two years ago when I started using Ubuntu I had quite some troubles installing all the LaTeX packages, citation styles, fonts etc (There are so many ways of doing it! See this discussion) Then, somehow I found this thread. I purged the original ubuntu-tex-live with everything else that had "tex" in it, and installed
Since then I've never ever had to think about installing anything related to latex. Any answer from Stackoverflow I wanted to try out just worked, any file any of my colleagues would send me flawlessly compiled (I remember spending hours getting someone else's .tex-files running, when I was on Windows). This was a miracle! And all I had to do was
sudo apt-get install texlive-full
Yes it will cost you 3GB of downloaded data and probably even more once it unpacks, but it will solve all your latex-related issues forever.
To sum this up, and to answer the original question
should I avoid installing it?
The answer is just the opposite:
texlive-full is the way to install LaTeX on Ubuntu.
For me the way to go in 2017 is to use a container like
docker for installation of the latex packages. This will always give me the possibility to install the most recent versions (Because I choose which distribution to pull from) and does not disturb my system with all those latex packages.
You could easily set your system up to use the pdflatex command out of your dockercontainer so that everything will work as expected, but it will run in the docker container.
And as another big benefit: When I want to build some latex on another system: I know I have my e.g. Dockerfile that I have to use and after that everything should work as expected. No specific headaches when migrating your production environment to another location.
Dockerfile could look like this:
FROM ubuntu:zesty MAINTAINER Jan Hermes <email@example.com> RUN apt-get update && apt-get install -y --no-install-recommends apt-utils RUN apt-get upgrade -y RUN apt-get install -y texlive-full RUN apt-get install -y xzdec RUN apt-get install -y wget RUN tlmgr init-usertree RUN tlmgr install collection-fontsrecommended collection-fontsextra libertine mweights fontaxes marvosym inconsolata newtx kastrup mathalfa was fnpct superiors translations cnltx pgfopts trimspaces csquotes pgfplots multirow tabulary rotfloat ntheorem glossaries mfirstuc xfor datatool substr tracklang cleveref mathdots marginnote biblatex logreq xstring xpatch german RUN apt-get install -y biber WORKDIR /data VOLUME ["/data"]
You can use that Dockerfile with the framework shown here.
Agree with @MMA that 2009 will work mostly fine, but if you really want to get the 2013 use:
curl https://raw.github.com/cirosantilli/latex-cheat/master/install-texlive2013-ubuntu12.04.sh | bash
If you want things to go way faster, first download TeX Live via torrent ISO via torrent:
wget -O /tmp/texlive2013.torrent https://www.tug.org/texlive/files/texlive2013.iso.torrent
and put it in the current directory with exact name
It will work if you don't do this, but will be way slower (4 hours instead of 20 minutes)
sudo rm -rf /usr/local/texlive/2013 ~/.texlive2013
At the time of the last edit, the script did:
if [ ! -f texlive2013.iso ]; then wget texlive2013.iso http://mirrors.linsrv.net/tex-archive/systems/texlive/Images/texlive2013.iso fi sudo mkdir -p /media/texlive2013 sudo mount -t iso9660 -o ro,loop,noauto texlive2013.iso /media/texlive2013 echo i | sudo /media/texlive2013/install-tl sudo umount /media/texlive2013 sudo rmdir /media/texlive2013 # If you are done with it for good: #rm texlive2013.iso echo ' # Texlive export PATH=$PATH:/usr/local/texlive/2013/bin/'"$(uname -i)"'-linux export MANPATH=$MANPATH:/usr/local/texlive/2013/texmf-dist/doc/man export INFOPATH=$INFOPATH:/usr/local/texlive/2013/texmf-dist/doc/info ' >> ~/.profile source ~/.profile
Logout, and login again and you're done.
Worked today on Ubuntu 12.04, I'll try to report any errors back.
The GitHub one will be kept up to date, so just use that one.
More powerful install script
Scott is maintaining a much more advanced installation script at: https://github.com/scottkosty/install-tl-ubuntu
I update software regularly. I do not want to update 3-4GB of unnecessary stuff regularly... and I believe you don't want to waste time and resources on that, too.
Install system packages (for Ubuntu and its derivatives; similar package structure is used in other distros):
texlive-latex-base texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra (IMHO you'll use a package from here at some point, unless you're doing very basic stuff only) texlive-bibtex-extra (if you do citations, you probably need that) texlive-lang-(yourlang) (for any language you're writing documents in, except English)
If you know you're using pstricks, lualatex, xetex, or some specific fonts, go forth and install the respective system packages right away. If there's a specific package that your humanities/science/music/games stuff relies on, install the -humanities, -science, -music or -games package.
After that install stuff once needed. Yes, there's thousands of latex packages and fonts and stuff, but they're bundled into just a bunch of system packages (ones installed by system package manager), so you won't need to install stuff every time.
The key is to avoid installing latex packages outside of a package manager as much as possible. In 99.5% cases your latex package is already in some system package and you just need to invoke your software manager!