actually this is a further comment on corentin's answer, but it exceeds 600 characters.
Since http://www.tug.org/texlive/devsrc/Master/texmf-dist/tex/latex/ is an Apache directory listing you can try downloading packages with wget. For example if you want to download l3experimental
where xcoffins
is a subfolder you can invoke wget like
wget --cut-dir=4 -np -R "index.html*" -nH -P ~/texmf -r http://www.tug.org/texlive/devsrc/Master/texmf-dist/tex/latex/l3experimental/
or
wget --cut-dir=6 -np -R "index.html*" -P ~/texmf/tex/latex -r http://www.tug.org/texlive/devsrc/Master/texmf-dist/tex/latex/l3experimental/
this.
-P ~/dir/in/home/directory/
specifies the local directory where wget
should put your files.
-nH
tells wget
that you don't want to create directories named after the host i.e. ~/texmf/www.tug.org/*/*/
looks not so nice and latex won't find anything under ~/texmf/www.tug.org
. But you can omit -nH
and change the local directory to -P ~/textmf/tex/latex
. Then you have a seperate directory tree that latex also searches.
- whereby
--cut-dir=x
means that you don't want to create the first x folders of the uri in your local directory (you want to create ~/texmf/tex/latex/l3experimental/
or ~/texmf/tex/latex/www.tug.org/l3experimental/
instead of ~/textmf/texlive/devsrc/Master/texmf-dist/tex/latex/l3experimental
).
-R
instructs wget
to exclude all files beginning with index.html
.
-r
is for recursive fetch
- the argument of
-P
is the directory where you want to save all those things
-np
excludes all parent directories of l3experimental
(of course you can find a more detailed description in the manual pages of wget
)
but generally be careful if you download things with wget
recursively it could mess up a whole directory tree. I would recommend you to first download the files in a temporary directory (for example with -P ~/texmftemporary
) where you can examine the downloaded directory tree.
Since latex also searches recursively for packages in ~/texmf/tex/latex
you don't have to bother if xcoffins
is a subfolder of any other folder/folders.
Of course you can redefine things further if you write a little bash
, perl
or whatever
script that is based on the above command.
Maybe this helps you!?
If you have both a GNU/Linux distribution provided TeX Live and a manually installed one, you'll have two different tlmgr
.
The one in /usr/bin
will not update packages, but just change configuration parameters.
The one in /usr/local/texlive/<YEAR>/bin/<ARCH>
, instead, will do updates to the manually installed TeX Live. Here <YEAR>
stands for the version you have, probably 2014
, while <ARCH>
is the standard symbolic name for the processor, say x86_64-linux
or i386-linux
.
The correct call, if your data is as above, is
sudo /usr/local/texlive/2014/bin/x86_64-linux/tlmgr --gui
When doing a manual installation of TeX Live, I recommend doing
sudo ln -s /usr/local/texlive/2014/bin/x86_64-linux /opt/texbin
so you just need to add to your PATH the simpler /opt/texbin
and have another benefit: when TeX Live 2015 is released and you install it, you just have to do
sudo rm /opt/texbin
sudo ln -s /usr/local/texlive/2015/bin/x86_64-linux /opt/texbin
and do no other change to your setup, because your PATH variable will already point to the correct location. If you create this symbolic link, then
sudo /opt/texbin/tlmgr --gui
will become the correct call.
See this article on TUGboat which explains the installation procedure I recommend and that's still valid provided you just change the year from 2010 to the current release year.
Best Answer
The
$PATH
used bysudo
is different from the one used by$USER
, so if the$PATH
does not include, in your case, the path/usr/local/texlive/2018/bin/x86_64-linux/
, thensudo
will not be able to findtlmgr
.On Ubuntu,
I highly recommend thatyou can install texlive viaapt
. See the Ubuntu package database for a list of all packages related to texlive. Also, from the same domain as you provided, they have a page specifically written for Debian-based (which Ubuntu is based on) systems. If you choose to install the full distribution of texlive, you will not have to install texlive packages usingtlmgr
and just letapt
(the package manager for Debian-based systems) handle that for you. Otherwise, you will only need to runtlmgr
with thesudo
command, except now the distribution fromapt
should provide a symlink (or equivalent) to a path that your root account refers to.However, as pointed out in the subcomments, texlive on
apt
is possibly outdated.If disk space is a serious concern, and/or if you are comfortable with the command line, I highly recommend that you install
tlmgr
as a user instead of root. Follow the guide from Wikibooks for a minimal installation process. Last time I checked, the guide is still up to date. The important point to installtlmgr
so that it does not require root access is the following:You will need to change the default
/usr/local/
to your home directory.If disk space is not of your concern, then just choose the full distribution schema.
Edits: See also @daleif's comment under this reply, especially these two sentences:
Just more information for you to watch out for when deciding which installation path you wish to go down.