[Tex/LaTex] tlmgr: packages “not present in repository”

installingtexlivetlmgruplatex

Short version for the 'tl;dr' people:

Trying to install what I need on a fresh server, many packages are "not present in repository". For example:

# tlmgr install color
tlmgr: package repository ftp://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet (verified)
tlmgr install: package color not present in repository.

The details:

I'm not a TeX expert – I only use it in PHP code to create PDFs from database data. With considerable help from a guru I installed what I needed back in 2011, but now I need to prepare a new server, so I was hoping the newest versions of stuff would make this easier. So much for hoping…

I'm formatting Japanese text that is UTF-8 encoded, so I need uplatex. But I only need about a dozen packages. At first I tried installing all of Texlive, but random download failures kept it from getting very far into the huge list of packages I don't need. So I decided to try a more refined approach, but I clearly don't know what I'm doing.

I started with a "minimal scheme (plain only)" install. So far so good. Then I ran tlmgr install uplatex – it seems to have installed (it runs on a text document), but there were errors during installation (I'll paste the whole output in case you need it):

# tlmgr install uplatex
tlmgr: package repository ftp://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet (verified)
[1/10, ??:??/??:??] install: babel [505k]
[2/10, 00:03/01:33] install: latex [12806k]
[3/10, 00:43/00:51] install: latex-fonts [19k]
[4/10, 00:44/00:52] install: latexconfig [5k]
[5/10, 00:45/00:53] install: uplatex.x86_64-linux [1k]
[6/10, 00:46/00:54] install: uplatex [862k]
[7/10, 00:50/00:55] install: uptex.x86_64-linux [1309k]
[8/10, 00:55/00:56] install: uptex [9k]
[9/10, 00:56/00:57] install: uptex-base [159k]
[10/10, 00:57/00:57] install: uptex-fonts [122k]
tlmgr: package log updated: /usr/local/texlive/2016/texmf-var/web2c/tlmgr.log
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.
regenerating fmtutil.cnf in /usr/local/texlive/2016/texmf-dist
running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine euptex ...

tlmgr: fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine euptex failed (status 1), output:
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order):
fmtutil:   /usr/local/texlive/2016/texmf-dist/web2c/fmtutil.cnf
fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes:
fmtutil:   /usr/local/texlive/2016/texmf-config/web2c/fmtutil.cnf
fmtutil [INFO]: writing formats under /usr/local/texlive/2016/texmf-var/web2c
fmtutil [INFO]: --- remaking euptex with euptex
fmtutil: running `euptex -ini   -jobname=euptex -progname=euptex *euptex.ini' ...
This is e-upTeX, Version 3.14159265-p3.7-u1.21-160201-2.6 (utf8.uptex) (TeX Live 2016) (INITEX)
 restricted \write18 enabled.
entering extended mode
(/usr/local/texlive/2016/texmf-dist/tex/uptex/uptex-base/euptex.ini
(/usr/local/texlive/2016/texmf-dist/tex/uptex/uptex-base/euptex.src
(/usr/local/texlive/2016/texmf-dist/tex/uptex/uptex-base/uptex.tex
(/usr/local/texlive/2016/texmf-dist/tex/plain/base/plain.tex
Preloading the plain format: codes, registers, parameters, fonts, more fonts,
macros, math definitions, output routines, hyphenation
(/usr/local/texlive/2016/texmf-dist/tex/generic/hyphen/hyphen.tex
[skipping from \patterns to end-of-file...]))
(/usr/local/texlive/2016/texmf-dist/tex/uptex/uptex-base/ukinsoku.tex))
! I can't find file `eptexdefs.lib'.
\et@xload ...ge {Loading module "##1";}}\input #1
                                                  \def \module ##1{\iftrue }
\load ...={}}\et@xl@ad #1,\endl@ad \et@xload {#2}
                                                  \the \et@xtoks \fi
l.210 \load interactionmodes from eptexdefs.lib
                                                %%% \load <foo>[, <bar>...] ...

(Press Enter to retry, or Control-D to exit)
Please type another input file name:
! Emergency stop.
\et@xload ...ge {Loading module "##1";}}\input #1
                                                  \def \module ##1{\iftrue }
\load ...={}}\et@xl@ad #1,\endl@ad \et@xload {#2}
                                                  \the \et@xtoks \fi
l.210 \load interactionmodes from eptexdefs.lib
                                                %%% \load <foo>[, <bar>...] ...

No pages of output.
Transcript written on euptex.log.
fmtutil [INFO]: --- remaking uplatex with euptex
fmtutil: running `euptex -ini   -jobname=uplatex -progname=uplatex *uplatex.ini' ...
This is e-upTeX, Version 3.14159265-p3.7-u1.21-160201-2.6 (utf8.uptex) (TeX Live 2016) (INITEX)
 restricted \write18 enabled.
entering extended mode
(/usr/local/texlive/2016/texmf-dist/tex/uplatex/config/uplatex.ini
<<< making "uplatex with Babel" format >>>

(/usr/local/texlive/2016/texmf-dist/tex/uplatex/base/uplatex.ltx
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/latex.ltx
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/texsys.cfg)
./texsys.aux found

\@currdir set to: ./.

Assuming \openin and \input
have the same search path.


Defining UNIX/DOS style filename parser.

catcodes, registers, compatibility for TeX 2,  parameters,
LaTeX2e <2016/03/31> patch level 3
hacks, control, par, spacing, files, font encodings, lengths,
====================================

Local config file fonttext.cfg used

====================================
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/fonttext.cfg
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/fonttext.ltx
=== Don't modify this file, use a .cfg file instead ===

(/usr/local/texlive/2016/texmf-dist/tex/latex/base/omlenc.def)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/t1enc.def)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ot1enc.def)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/omsenc.def)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/t1cmr.fd)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ot1cmr.fd)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ot1cmss.fd)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ot1cmtt.fd)))
====================================

Local config file fontmath.cfg used

====================================
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/fontmath.cfg
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/fontmath.ltx
=== Don't modify this file, use a .cfg file instead ===

(/usr/local/texlive/2016/texmf-dist/tex/latex/base/omlcmm.fd)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/omscmsy.fd)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/omxcmex.fd)
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ucmr.fd)))
====================================

Local config file preload.cfg used

=====================================
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/preload.cfg
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/preload.ltx)) page nos.,
x-ref, environments, center, verbatim, math definitions, boxes, title,
sectioning, contents, floats, footnotes, index, bibliography, output,
===========================================
Local configuration file hyphen.cfg used
===========================================
(/usr/local/texlive/2016/texmf-dist/tex/generic/babel/hyphen.cfg
(/usr/local/texlive/2016/texmf-dist/tex/generic/babel/switch.def)
(/usr/local/texlive/2016/texmf-dist/tex/generic/hyphen/hyphen.tex)
(/usr/local/texlive/2016/texmf-dist/tex/generic/hyphen/dumyhyph.tex)
(/usr/local/texlive/2016/texmf-dist/tex/generic/hyphen/zerohyph.tex))
)
**************************
*
* making upLaTeX format
*
**************************
(/usr/local/texlive/2016/texmf-dist/tex/uplatex/base/uplcore.ltx
(/usr/local/texlive/2016/texmf-dist/tex/uplatex/base/upldefs.ltx
(/usr/local/texlive/2016/texmf-dist/tex/uplatex/base/jy2mc.fd)
(/usr/local/texlive/2016/texmf-dist/tex/uplatex/base/jy2gt.fd)
(/usr/local/texlive/2016/texmf-dist/tex/uplatex/base/jt2mc.fd)
(/usr/local/texlive/2016/texmf-dist/tex/uplatex/base/jt2gt.fd)
Loading kinsoku patterns for japanese.
(/usr/local/texlive/2016/texmf-dist/tex/uplatex/base/ukinsoku.tex)))
pLaTeX2e <2016/09/08u01> (based on LaTeX2e <2016/03/31> patch level 3)
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
 ) )
Beginning to dump on file uplatex.fmt
 (preloaded format=uplatex 2016.12.1)
4856 strings of total length 64788
48499 memory locations dumped; current usage is 218&48013
3554 multiletter control sequences
\font\nullfont=nullfont
\font\OMX/cmex/m/n/10=cmex10
\font\tenln=line10
\font\tenlnw=linew10
\font\tencirc=lcircle10
\font\tencircw=lcirclew10
\font\OT1/cmr/m/n/5=cmr5
\font\OT1/cmr/m/n/7=cmr7
\font\OT1/cmr/m/n/10=cmr10
\font\OML/cmm/m/it/5=cmmi5
\font\OML/cmm/m/it/7=cmmi7
\font\OML/cmm/m/it/10=cmmi10
\font\OMS/cmsy/m/n/5=cmsy5
\font\OMS/cmsy/m/n/7=cmsy7
\font\OMS/cmsy/m/n/10=cmsy10
\font\JT2/mc/m/n/10=upjisr-v at 9.6222pt
\font\JY2/mc/m/n/10=upjisr-h at 9.6222pt
\font\JY2/mc/m/n/5=upjisr-h at 4.8111pt
\font\JY2/mc/m/n/7=upjisr-h at 6.73553pt
\font\JY2/mc/m/n/12=upjisr-h at 11.54663pt
\font\JY2/gt/m/n/5=upjisg-h at 4.8111pt
\font\JY2/gt/m/n/7=upjisg-h at 6.73553pt
\font\JY2/gt/m/n/10=upjisg-h at 9.6222pt
\font\JY2/gt/m/n/12=upjisg-h at 11.54663pt
\font\JT2/mc/m/n/5=upjisr-v at 4.8111pt
\font\JT2/mc/m/n/7=upjisr-v at 6.73553pt
\font\JT2/mc/m/n/12=upjisr-v at 11.54663pt
\font\JT2/gt/m/n/5=upjisg-v at 4.8111pt
\font\JT2/gt/m/n/7=upjisg-v at 6.73553pt
\font\JT2/gt/m/n/10=upjisg-v at 9.6222pt
\font\JT2/gt/m/n/12=upjisg-v at 11.54663pt
\font\@bannerfont=cmtt9
5968 words of font info for 31 preloaded fonts
14 hyphenation exceptions
Hyphenation trie of length 6081 has 183 ops out of 35111
  2 for language 1
  181 for language 0
No pages of output.
Transcript written on uplatex.log.
fmtutil [INFO]: /usr/local/texlive/2016/texmf-var/web2c/euptex/uplatex.fmt installed.
fmtutil [ERROR]: running `euptex -ini   -jobname=euptex -progname=euptex *euptex.ini </dev/null' return status 1
fmtutil [ERROR]: return error due to options --strict
fmtutil [INFO]: Successfully rebuilt formats: 1
fmtutil [INFO]: Not selected formats: 9
fmtutil [INFO]: Failed to build: 1 (euptex/euptex)
fmtutil [INFO]: Total formats: 11
fmtutil [INFO]: exiting with status 1

running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine uptex ...
done running fmtutil-sys --no-error-if-no-engine=luajittex,mfluajit --no-error-if-no-format --byengine uptex.
tlmgr: An error has occurred. See above messages. Exiting.

In spite of the above errors, uplatex appears to be there – uplatex '\documentclass{ujarticle} \begin{document} Test \end{document}' runs with no errors.

But then I tried to install the packages I need – here were the first nine:

# tlmgr install plext otf fontenc lmodern geometry verbatim lscape textpos graphicx
tlmgr: package repository ftp://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet (verified)
tlmgr install: package fontenc not present in repository.
tlmgr install: package graphicx not present in repository.
tlmgr install: package lmodern not present in repository.
tlmgr install: package lscape not present in repository.
tlmgr install: package otf not present in repository.
tlmgr install: package plext not present in repository.
tlmgr install: package verbatim not present in repository.
[1/2, ??:??/??:??] install: geometry [228k]
[2/2, 00:05/00:12] install: textpos [325k]
tlmgr: action install returned an error; continuing.
tlmgr: package log updated: /usr/local/texlive/2016/texmf-var/web2c/tlmgr.log
running mktexlsr ...
done running mktexlsr.
tlmgr: An error has occurred. See above messages. Exiting.

And the last four:

# tlmgr install needspace hanging color ulem
tlmgr: package repository ftp://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet (verified)
tlmgr install: package color not present in repository.
[1/3, ??:??/??:??] install: hanging [152k]
[2/3, 00:04/00:10] install: needspace [158k]
[3/3, 00:06/00:08] install: ulem [107k]
tlmgr: action install returned an error; continuing.
tlmgr: package log updated: /usr/local/texlive/2016/texmf-var/web2c/tlmgr.log
running mktexlsr ...
done running mktexlsr.
tlmgr: An error has occurred. See above messages. Exiting.

So 8 of 13 packages failed to be found in the repository. Yes, a couple might be a bit obscure, but I think most of them are pretty common. So why can't tlmgr find them?

(Environment: VM with CentOS 7.2)


EDIT: Trying to follow the helpful answers by David Carlisle and Piet van Oostrum (Piet with specifics of 7 of the packages and David with the "teach a man to fish" type instruction about how this stuff works), I tried to do more, but it's still not making sense. Perhaps the fact that the installation of uplatex had errors is causing some of the problem, but I really don't know how to decipher that.

Anyway, I changed the name of lmodern in my code to lm, and successfully installed graphics, lm, and japanese-otf. I tried tlmgr install required but it didn't know what I was talking about. tlmgr install latex claims that latex is already installed.

Running a test file again (the code that uses the first 9 packages mentioned above), it complained about packages I had just installed and even packages I've never heard of! I'm really confused. Here is the transcript (a bit snipped out of the middle) with me simply pressing Enter when prompted:

[09:01 AM]-[root@7and7]-[/var/www]
# tlmgr install graphics
tlmgr: package repository ftp://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet (verified)
[1/2, ??:??/??:??] install: graphics [2000k]
[2/2, 00:05/00:05] install: graphics-cfg [2k]
tlmgr: package log updated: /usr/local/texlive/2016/texmf-var/web2c/tlmgr.log
running mktexlsr ...
done running mktexlsr.

[09:01 AM]-[root@7and7]-[/var/www]
# tlmgr install required
tlmgr: package repository ftp://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet (verified)
tlmgr install: package required not present in repository.
tlmgr: action install returned an error; continuing.
tlmgr: An error has occurred. See above messages. Exiting.

[09:03 AM]-[root@7and7]-[/var/www]
# tlmgr install lm
tlmgr: package repository ftp://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet (verified)
[1/1, ??:??/??:??] install: lm [17956k]
tlmgr: package log updated: /usr/local/texlive/2016/texmf-var/web2c/tlmgr.log
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.

[09:08 AM]-[root@7and7]-[/var/www]
# tlmgr install graphics
tlmgr: package repository ftp://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet (verified)
tlmgr install: package already present: graphics

[09:13 AM]-[root@7and7]-[/var/www]
# tlmgr install japanese-otf
tlmgr: package repository ftp://ftp.kddilabs.jp/CTAN/systems/texlive/tlnet (verified)
[1/1, ??:??/??:??] install: japanese-otf [441k]
tlmgr: package log updated: /usr/local/texlive/2016/texmf-var/web2c/tlmgr.log
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
done running updmap-sys.

[09:15 AM]-[root@7and7]-[/var/www]
# uplatex test
This is e-upTeX, Version 3.14159265-p3.7-u1.21-160201-2.6 (utf8.uptex) (TeX Live 2016) (preloaded format=uplatex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
pLaTeX2e <2016/09/08u01> (based on LaTeX2e <2016/03/31> patch level 3)
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/uplatex/base/ujarticle.cls
Document Class: ujarticle 2011/05/07 v1.6-u00 Standard upLaTeX class
(/usr/local/texlive/2016/texmf-dist/tex/uplatex/base/ujsize10.clo))

! LaTeX Error: File `plext.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:

! LaTeX Error: File `japanese-otf.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:

! LaTeX Error: Unknown option `uplatex' for package `japanese-otf'.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.4 \usepackage
               [T1]{fontenc}
?

...
SNIP: OTHER STUFF THAT DIDN'T LOOK RELEVANT
...

! LaTeX Error: File `lm.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
(/usr/local/texlive/2016/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty)

! LaTeX Error: File `ifpdf.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:

! LaTeX Error: File `ifvtex.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
(/usr/local/texlive/2016/texmf-dist/tex/generic/ifxetex/ifxetex.sty))

! LaTeX Error: File `verbatim.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/lscape.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-def/dvips.def)))
(/usr/local/texlive/2016/texmf-dist/tex/latex/textpos/textpos.sty
Package: textpos 2016/06/07 1.8, absolute positioning of text on the page
Grid set 16 x 16 = 17.78296pt x 26.31879pt
) (/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphicx.sty)
No file test.aux.
*geometry* driver: auto-detecting
! Undefined control sequence.
\Gm@detectdriver ...driver: auto-detecting}\ifpdf
                                                  \Gm@setdriver {pdftex}\els...
l.13 \begin{document}

?
! Undefined control sequence.
\Gm@detectdriver ...@setdriver {dvips}\fi \ifvtex
                                                  \Gm@setdriver {vtex}\fi \i...
l.13 \begin{document}

?

At that point I quit it. An example of what doesn't make sense to me is this sequence:

  1. japanese-otf installed successfully. uplatex complains, "Error: File
  2. japanese-otf.sty not found." (What? Where was it installed, then?)
  3. uplatex complains, "Unknown option uplatex for package
    japanese-otf." (How do you know, if you can't find the package to
    start with?)

Can you see a bit more of what is going on?

Best Answer

a "package" to tlmgr is a unit of files that are installed together it does not necessarily relate directly to a latex "package" (it may just contain fonts, or a binary program, for example) In the case of color that is part of the texlive graphics package. (an easy way to see the texlive package any file is contained in is to look at the ctan page for the file eg

https://www.ctan.org/pkg/color

which shows the miktex and texlive package that it is contained in.

Actually graphics is part of the latex "required" distribution, so if you have latex at all you should already have the graphics packages including color.