# Tlmgr: action install returned an error

**URL:** <https://travis-ci.community/t/tlmgr-action-install-returned-an-error/7416>\
**Category:** Travis CI Discussions & Feedback\
**Created:** [March 2, 2020, 4:47pm UTC](https://travis-ci.community/t/tlmgr-action-install-returned-an-error/7416 "2020-03-02T16:47:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lindsayrutter](https://avatars.discourse-cdn.com/v4/letter/l/7cd45c/32.png) [@lindsayrutter](https://travis-ci.community/u/lindsayrutter)\
**Post date:** [March 2, 2020, 4:47pm UTC](https://travis-ci.community/t/tlmgr-action-install-returned-an-error/7416/1 "2020-03-02T16:47:36Z")

</div>

Hello! I have been trying to use Travis-CI on my package and have been receiving several [errors](https://github.com/lindsayrutter/ggenealogy/commits/master). I originally received a `media9` related error, which I fixed by following instructions [here](https://tex.stackexchange.com/questions/398830/how-to-build-my-latex-automatically-using-travis-ci), namely by adding the [install\_texlive.R](https://github.com/lindsayrutter/ggenealogy/blob/master/install_texlive.R) document suggested in one of the answers. However, this resulted in a new error, which I have yet to solve:

`tlmgr: action install returned an error`

I followed advise I found on a [travis-ci issues page](https://github.com/travis-ci/travis-ci/issues/10166). Namely, I added:

`before_install:`  
` - if [["$OSTYPE" != "linux-gnu"]]; then sudo tlmgr install framed titling; fi`

to my `.travis.yml` file. There was also a suggestion on that page to add:

`sudo tlmgr install X`

but I was not sure where to add that item (if it is still recommended).

How can I fix this persistent error (`tlmgr: action install returned an error`) on travis CI? Any advise would be very much appreciated!

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [March 2, 2020, 5:51pm UTC](https://travis-ci.community/t/tlmgr-action-install-returned-an-error/7416/2 "2020-03-02T17:51:36Z")

</div>

That’s a general error message signalling of errors before. So you need to scan the log backwards for any more specific error messages.

The most relevant thing I see is

[https://travis-ci.com/lindsayrutter/ggenealogy/builds/151388148#L829](https://travis-ci.com/lindsayrutter/ggenealogy/builds/151388148#L829)

```
tlmgr install: package ifluatex not present in repository.
tlmgr install: package ifxetex not present in repository.

```

Looking up installation instruction for those packages:

[https://www.ctan.org/pkg/ifluatex](https://www.ctan.org/pkg/ifluatex)

> Contained in [TeX Live](https://www.ctan.org/pkg/texlive) as `iftex`

[https://www.ctan.org/pkg/ifxetex](https://www.ctan.org/pkg/ifxetex)

> Contained in [TeX Live](https://www.ctan.org/pkg/texlive) as `iftex`

So it looks like you need to replace those dependencies with `iftex`. If they are specificed in code outside your control, preinstalling `iftex` may satisfy the dependency checker.

I see further in the log that `iftex` is actually being installed, so the above error messages may or may not be bogus.

* * *

It’s also possible that the title error message is a red herring. The above build seems to actually fail on not finding any `.tex` files.

---

<div class="post-metadata">

**Author:** ![lindsayrutter](https://avatars.discourse-cdn.com/v4/letter/l/7cd45c/32.png) [@lindsayrutter](https://travis-ci.community/u/lindsayrutter)\
**Post date:** [March 3, 2020, 2:20am UTC](https://travis-ci.community/t/tlmgr-action-install-returned-an-error/7416/3 "2020-03-03T02:20:15Z")

</div>

Thank you for your response. I unsuccessfully tried adding specific installation for `ifluatex` and `ifxetex` [here](https://github.com/lindsayrutter/ggenealogy/commit/204c7e51dff79d1aeb5d1c162ade1294c27da2af) but this resulted in errors related to [tlmgr installation](https://travis-ci.com/lindsayrutter/ggenealogy/builds/151471237).

You suggested that the `iftex` issue may be bogus. However, I am unclear on your last two sentences about the title error message being a red herring and the above failing because `.tex` files cannot be found. Is there any steps I should take to allow the system to find the necessary `.tex` files? Thank you again for sharing advice.

---

<div class="post-metadata">

**Author:** ![lindsayrutter](https://avatars.discourse-cdn.com/v4/letter/l/7cd45c/32.png) [@lindsayrutter](https://travis-ci.community/u/lindsayrutter)\
**Post date:** [March 3, 2020, 4:18am UTC](https://travis-ci.community/t/tlmgr-action-install-returned-an-error/7416/4 "2020-03-03T04:18:51Z")

</div>

I’m happy to say I think I have it [working now](https://github.com/lindsayrutter/ggenealogy/commit/dfe1f031c7cee72c99f2ee72532244bbbab66704). In my .travis.yml file, I:

Removed the line:

```auto
- Rscript -e 'tinytex::pdflatex(list.files(pattern = "\\.tex$")[1], bib_engine = "biber")'

```

Added the line:

```auto
- Rscript install_texlive.R

```

Added `latexmk` to the following line:

```auto
- if [["$OSTYPE" != "linux-gnu"]]; then sudo tlmgr install framed titling latexmk; fi

```

Thanks again.
