4

I installed TeX Live 2013 from CTAN by following the instructions here: How to install "vanilla" TeXLive on Debian or Ubuntu?

And it's all working very nicely. However, what I didn't do was purge the original TeX from my Ubuntu 12.04 system. The command

dpkg --get-selections | grep tex

shows a vast panoply of installed TeX packages. Now, suppose I entered:

apt-get purge tex*

Would that remove just the original TeX packages installed from the Ubuntu repositories, or would it, since my fiddling with equiv, kill the new TeXlive as well?

I don't want to experiment, as I now have TeX and friends up and running as I like, and I don't want to have to do it all over again!

Alasdair
  • 5,257
  • 4
  • 38
  • 64
  • You only need to set up $PATH to point to the new installation. Here I have echo $PATH /usr/local/texlive/2013/bin/i386-linux:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games – Sigur Jan 30 '14 at 23:29
  • It shouldn't, but I haven't tried in a few years. However, the middle ground between leaving them and removing them is to remove all the Apt-installed files relating to 'fonts' and 'doc': they usually take up the lion's share of disk space. – jon Jan 30 '14 at 23:45
  • @Sigur That's only true if you don't want you use your distro's package manager to install anything with a tex-related dependency. Lots of people will want to install e.g. an editor this way. Hence the stuff with equiv (which I think is something like installing a dummy package with other Linux distros). – cfr Jan 31 '14 at 00:06
  • Yes, I set my PATH to include /opt/texbin and that's fine. But in the interests of de-cluttering my system, I'd like to remove all the previous TeX material that isn't part of the new TeXlive install. – Alasdair Jan 31 '14 at 01:04
  • Guys, I think that I'll delete my poor answer to avoid confusion. Sorry for those who wrote comments there. – Sigur Jan 31 '14 at 10:58

1 Answers1

1

Edit your .bashrc and insert

PATH=/usr/local/texlive/2013/bin/i386-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2013/texmf/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2013/texmf/doc/info:$INFOPATH; export INFOPATH

Replace mine path to yours.

Or edit /etc/environment as suggested by @daleif.

Sigur
  • 37,330
  • It is recommended not to set MANPATH in general. I'm honestly not sure how this should be handled because putting that in .bashrc will likely give quite the wrong result. (Typically, only the texlive directory will end up in MANPATH and this will prevent man from finding manpages for everything else.) Or do you know that Ubuntu is an exception on this and sets MANPATH explicitly? (A typical setting for MANPATH is nothing at all, in which case locations are deduced on-the-fly on the basis of PATH. But this does not seem to work for texlive.) Also, see my comment above. – cfr Jan 31 '14 at 00:10
  • 1
    Well, now I am confused I had never had troubles with man. – Sigur Jan 31 '14 at 00:30
  • Hmm... Maybe it tacks it on to the on-the-fly creation rather than replacing it, in that case? Apologies. I'm sure I tried this a couple of years ago and it didn't work at all, but now it seems it works even though echo $MANPATH gives nothing. I wonder if it is still recommended not to set it at all in this case? Or if it is just recommended now not to overwrite the system manpath? (So supplementing it for texlive would be fine and I could maybe get apropos working for texlive!) You don't need to touch it at all just to use man by the way. – cfr Jan 31 '14 at 00:37
  • I always use texdoc <package name> for example, or man <command>, for example. – Sigur Jan 31 '14 at 00:39
  • Thinking about it, it only really makes sense to supplement it at the system rather than user level unless you are creating a personal database. – cfr Jan 31 '14 at 00:40
  • But man <command> will work without your touching MANPATH. It is enough to change PATH. And texdoc <package name> is independent, as far as I know. None of that requires changing more than PATH. It is only that that is not enough to make apropos work, for example, because the supplementary path is not included when the database is updated since that runs as root. – cfr Jan 31 '14 at 00:42
  • No, I don't need to change MANPATH its basic directories are set in /etc/manpath.config, and any other man pages are found on the fly by investigating the PATH variable. I can for example enter man tlmgr happily, even though tlmgr only exists (on my system) because of the new TeXlive install. – Alasdair Jan 31 '14 at 01:04
  • Please do not recommend setting the PATH variable using bashrc, it is not read if starting an editor via a menu. If the system is Ubuntu, then add the path in /etc/environment – daleif Jan 31 '14 at 08:16
  • @daleif, strange. I have PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" in /etc/environment and my editor via menu works fine. – Sigur Jan 31 '14 at 10:57
  • 1
    @Sigur, can it actually compile your documents? i.e. find LaTeX? I've seen many examples where they could not, because the shell the editor use to call LaTeX is not a BASH shell. Which is why I tend to recommend adding it to /etc/environment instead – daleif Jan 31 '14 at 11:27
  • @daleif why wouldn't it? my setup is the same as Sigur. Of course, I've had it before with your recommendation. – doed Jan 31 '14 at 13:18
  • 1
    @doed To test it I just did the following: Installed Ubuntu 13.10 virtually. Installed minimal TL13 (takes 2min). Installed texmaker using sudo apt-get install --no-install-recommends texmaker, and added the TL path to ~/.bashrc. Then I start texmaker via the dashboard (or what ever that is called), and it cannot find pdflatex. If I start TM from the command line, it starts in an environment where the PATH is set and it knows where pdflatex is and it works. But started via the dashboard it does not. This is why I do not recommand using .bashrc to add the PATH. – daleif Jan 31 '14 at 14:43
  • @daleif, thank you for your time for testing out the minimal TL, but I was referring to Sigur's comment about the /etc/environment/. It follows that my setup, is the same as his. That is, the /etc/environment is unchanged. It is worthwhile to point out, that .bashrc should not be edited either, as you said. So in that respect, I have to partially agree with you. I can't fully agree, because in the case of Ubuntu or Mint, as long as the PATH is set in .profile, everything is good, so it makes no sense whatsoever, to modify /etc/environment. – doed Feb 01 '14 at 13:21
  • What makes you believe that Alasdair is running on i386? – Martin Schröder Feb 01 '14 at 15:39
  • Who said anything about .profile, might be better, I'm just trying to get rid of the advise to add the path change to bashrc – daleif Feb 01 '14 at 17:11
  • @doed, where is sigur saying anything about /etc/environment? – daleif Feb 01 '14 at 17:13
  • @daleif, I edited my answer to cite your comment about /etc/environment. – Sigur Feb 01 '14 at 17:19
  • @daleif before you asked him "can it actually compile your documents?" and the answer is yes daleif, it will compile. – doed Feb 01 '14 at 20:33
  • Which my experiment show is not really the case.... Whatever – daleif Feb 01 '14 at 20:37
  • Thanks again. I'm running 64 bits at work; 32 at home. As an experiment just this morning I removed and purged all TeX/LaTeX from my home system, and installed TeXlive using the script at https://github.com/scottkosty/install-tl-ubuntu With regard to setting environment variables, I've never had any problem putting them in my .bashrc; except that of course they are not available to other shells until the next X restart. In practice that's not a problem except for emacs, and I get round that by starting emacs from the shell, rather than from a desktop icon. – Alasdair Feb 02 '14 at 01:30
  • @daleif I said I agree with you in regards to bashrc, not in the /etc/environment part. – doed Feb 02 '14 at 03:26
  • @doed, I agree .profile will be a better solution if it exist and if it is a single user system. So now we just hae to figure out who is recommended that .bashrc stuff in the first place. – daleif Feb 06 '14 at 16:17
  • @daleif, just set the PATH in each .profile, and if the .profile does not exist, create it. In the case of Ubuntu or Mint, the latter should not be a concern, since it exists for all the users. I agree with you when you asked who recommended to set it in .bashrc in the first place, but couldn't the same be said about modifying /etc/environment? That idea has infested the whole stack exchange. – doed Feb 07 '14 at 13:22
  • It depends on the situation, for multiuser, .profile is not the solution. And of course /etc/environment is not a good idea in general, but it is better than .bashrc and lets people get on with their systems. Some more research is probably needed, if not then to see for which systems is .profile a good solution. – daleif Feb 07 '14 at 13:42