Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unable to locate TeX Live's binary directory #331

Closed
izzalDev opened this issue Nov 30, 2024 · 7 comments
Closed

Error: Unable to locate TeX Live's binary directory #331

izzalDev opened this issue Nov 30, 2024 · 7 comments
Labels
question Further information is requested

Comments

@izzalDev
Copy link

When running the teatimeguest/setup-texlive-action@v3 action with the configuration below, an error occurs indicating that the TeX Live binary directory cannot be located:

- name: Setup TeX Live
  uses: teatimeguest/setup-texlive-action@v3
  with:
    package-file: |
      ./.github/template_deps.txt
      ./.github/basictex_deps.txt

The action begins by parsing the dependencies from the template_deps.txt and basictex_deps.txt files, and it successfully restores the cache. However, it encounters the following error:

Run teatimeguest/setup-texlive-action@v3
  with:
    package-file: ./.github/template_deps.txt
  ./.github/basictex_deps.txt
  
    cache: true
    tlcontrib: false
    update-all-packages: false
Looking for `package-file`...
Parsing `/home/runner/work/PPB_A11.47[2](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094412889/job/33726430317#step:4:2)1/PPB_A11.4721/.github/template_deps.txt`...
Parsing `/home/runner/work/PPB_A11.4721/PPB_A11.4721/.github/basictex_deps.txt`...
[3](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094412889/job/33726430317#step:4:3)65 package(s) found: adjustbox ae amscls amsfonts amsmath anysize arabxetex atbegshi attachfile2 attachfile2.universal-darwin atveryend automata auxhook babel babel-basque babel-czech babel-danish babel-dutch babel-english babel-finnish babel-french babel-german babel-hungarian babel-italian babel-norsk babel-polish babel-portuges babel-spanish babel-swedish babelbib background bbcard beamer bibtex bibtex.universal-darwin bidi bidi-atbegshi bidicontour bidipagegrid bidipresentation bidishadowtext bigintcalc bitset blockdraw_mp bookmark booktabs bpolynomial breqn businesscard-qrcode caption carlisle cite cm cmap cmarrows collectbox collection-basic collection-latex collection-latexrecommended collection-metapost collection-xetex colorprofiles colortbl cqubeamer crop csquotes ctable ctablestack dehyph drv dviincl dvipdfmx dvipdfmx.universal-darwin dvips dvips.universal-darwin ec emp enctex epsincl epstopdf-pkg eso-pic etex etex-pkg etexcmds etoolbox euenc euler eurosym everypage everysel everyshi expressg exteps extsizes fancybox fancyhdr fancyref fancyvrb featpost feynmf feynmp-auto filehook firstaid fix2col fixlatvian fiziko float font-change-xetex fontbook fontspec fontwrap footmisc footnotebackref footnotehyper fp framed fvextra garrigues geometry gettitlestring glyphlist gmp graphics graphics-cfg graphics-def grfext grffile hatching hershey-mp hologo hopatch huffman hycolor hyperref hyph-utf8 hyphen-base hyphen-basque hyphen-czech hyphen-danish hyphen-dutch hyphen-english hyphen-finnish hyphen-french hyphen-german hyphen-hungarian hyphen-italian hyphen-norwegian hyphen-polish hyphen-portuguese hyphen-spanish hyphen-swedish hyphenex ifplatform iftex index infwarerr intcalc interchar jknapltx knuth-lib knuth-local koma-script kpathsea kpathsea.universal-darwin kvdefinekeys kvoptions kvsetkeys l3backend l3experimental l3kernel l3packages latex latex-base-dev latex-bin latex-bin.universal-darwin latex-firstaid-dev latex-fonts latex-lab latexbug latexconfig latexmp letltxmacro lineno listings lm lm-math ltxcmds ltxmisc lua-alt-getopt lua-uni-algos luahbtex luahbtex.universal-darwin lualibs luaotfload luaotfload.universal-darwin luatex luatex.universal-darwin luatexbase lwarp lwarp.universal-darwin ly1 makecmds makeindex makeindex.universal-darwin mathspec mathtools mcf2graph mdframed mdwtools memoir metafont metafont.universal-darwin metago metalogo metaobj metaplot metapost metapost-colorbrewer metapost.universal-darwin metauml mflogo mfnfss mfpic mfpic[4](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094412889/job/33726430317#step:4:4)ode mfware mfware.universal-darwin microtype minim-hatching modes mp3d mparrows mpattern mpchess mpcolornames mpgraphics mptopdf mptopdf.universal-darwin mptrees mweights na-position natbib needspace newfloat ntgclass oberdiek pagecolor pagesel parskip pdfcolfoot pdfescape pdflscape pdfmanagement-testphase pdfpages pdftex pdftex.universal-darwin pdftexcmds pgf philokalia piechartmp plain polyglossia psfrag pslatex psnfss pspicture ptext ragged2e rcs realscripts refcount repere rerunfilecheck revtex roex roundrect sansmath scheme-basic scheme-infraonly scheme-minimal scheme-small section seminar sepnum setspace shapes simple-resume-cv simple-thesis-dissertation slideshow soul sourcecodepro sourcesanspro splines stringenc suanpan subfig symbol synctex synctex.universal-darwin tetragonos tex tex-ini-files tex.universal-darwin texlive-common texlive-en texlive-msg-translations texlive-scripts texlive-scripts.universal-darwin texlive.infra texlive.infra.universal-darwin textcase textpath threeddice thumbpdf thumbpdf.universal-darwin times tipa titling tlshell tlshell.universal-darwin tools translator typehtml ucharcat ucharclasses ulem underscore unicode-bidi unicode-data unicode-math unimath-plain-xetex uniquecounter unisugar upquote url xcolor xdvi xdvi.universal-darwin xebaposter xechangebar xecjk xecolor xecyr xeindex xelatex-dev xelatex-dev.universal-darwin xesearch xespotcolor xetex xetex-itrans xetex-pstricks xetex-tibetan xetex.universal-darwin xetexconfig xetexfontinfo xetexko xevlna xfrac xkeyval xltxtra xpatch xunicode xurl zapfding zbmath-review-template zref
Restoring cache
  Received 1048[5](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094412889/job/33726430317#step:4:5)7[6](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094412889/job/33726430317#step:4:6)00 of 260296302 (40.3%), 100.0 MBs/sec
  Cache Size: ~248 MB (260296302 B)
  /usr/bin/tar -xf /home/runner/work/_temp/0f84e19b-d[7](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094412889/job/33726430317#step:4:7)e7-4bda-9600-604cc3cf15b7/cache.tzst -P -C /home/runner/work/PPB_A11.4721/PPB_A11.4721 --use-compress-program unzstd
  Received 260296302 of 260296302 (100.0%), 124.1 MBs/sec
  Cache restored successfully
  /home/runner/work/_temp/setup-texlive-action/2024 restored from cache with key: setup-texlive-action-linux-x64-2024-bc31d157[8](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094412889/job/33726430317#step:4:8)e2362765f355ec342787336c5ccaba54c20a[9](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094412889/job/33726430317#step:4:10)649805bb962ff9d4b8
| Error: Unable to locate TeX Live's binary directory
|     at Object.add (setup-texlive-action/v3/packages/texlive/src/tlmgr/actions/path.ts:13:[11](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094412889/job/33726430317#step:4:12))
|     at main (setup-texlive-action/v3/packages/action/src/runs/main/index.ts:44:3)
|     at run (setup-texlive-action/v3/packages/action/src/runs/index.ts:[12](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094412889/job/33726430317#step:4:13):7)
|     at setup-texlive-action/v3/packages/action/src/index.ts:4:1 {
|   [cause]: Error: /home/runner/work/_temp/setup-texlive-action/2024/bin has multiple entries
|       at uniqueChild (setup-texlive-action/v3/packages/utils/src/fs.ts:41:11)
|       at Object.add (setup-texlive-action/v3/packages/texlive/src/tlmgr/actions/path.ts:11:11)
|       at main (setup-texlive-action/v3/packages/action/src/runs/main/index.ts:44:3)
|       at run (setup-texlive-action/v3/packages/action/src/runs/index.ts:12:7)
|       at setup-texlive-action/v3/packages/action/src/index.ts:4:1
| }
Error: Error: Unable to locate TeX Live's binary directory

When the cache is set to false or the cache is removed entirely, no issues occur, and the action runs successfully.

@muzimuzhi
Copy link
Contributor

muzimuzhi commented Nov 30, 2024

[cause]: Error: /home/runner/work/_temp/setup-texlive-action/2024/bin has multiple entries

Interesting. Maybe you can list the entries in that directory, using

- name: Setup TeX Live
  uses: teatimeguest/setup-texlive-action@v3
  with:
    package-file: |
      ./.github/template_deps.txt
      ./.github/basictex_deps.txt
- name: List entries
  if: failure()
  run: ls -l /home/runner/work/_temp/setup-texlive-action/2024/bin

I guess one possible cause is that multi-platform installations were cached, or cache created for another platform was restored.


For an instant workaround, just delete the cache and rerun the job?

@izzalDev
Copy link
Author

For an instant workaround, just delete the cache and rerun the job?

Yeah, but this method consumes GitHub runner quota, which might not be ideal for long-term solutions.

Output from the List entries step:

Run ls -l /home/runner/work/_temp/setup-texlive-action/2024/bin
total 8
drwxr-xr-x 2 runner docker [4](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094687869/job/33726995730#step:5:5)096 Nov 30 04:01 universal-darwin
drwxr-xr-x 2 runner docker 4096 Nov 30 04:01 x8[6](https://github.com/izzalDev/PPB_A11.4721/actions/runs/12094687869/job/33726995730#step:5:7)_64-linux

@muzimuzhi
Copy link
Contributor

Remove the disturbing links we get

Run ls -l /home/runner/work/_temp/setup-texlive-action/2024/bin
total 8
drwxr-xr-x 2 runner docker 4096 Nov 30 04:01 universal-darwin
drwxr-xr-x 2 runner docker 4096 Nov 30 04:01 x86_64-linux

What's the platform your job runs on? And would you mind further listing what's inside universal-darwin and x86_64-linux?

@izzalDev
Copy link
Author

What's the platform your job runs on? And would you mind further listing what's inside universal-darwin and x86_64-linux?

I am running on ubuntu-latest. Here is the complete workflow:

name: Generate Dokumentasi

on:
  workflow_dispatch:
  push:

jobs:
  generate:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Setup TeX Live
        uses: teatimeguest/setup-texlive-action@v3
        with:
          package-file: |
            ./.github/template_deps.txt
            ./.github/basictex_deps.txt
            
      - name: List entries
        if: failure()
        run: ls -l /home/runner/work/_temp/setup-texlive-action/2024/bin

      - name: Setup Pandoc
        uses: r-lib/actions/setup-pandoc@v2
        with:
          pandoc-version: 3.5

      - name: Run documentation script
        run: bash ../.github/docs.sh "Rizal Fadlullah" "A11.2019.12070"
        working-directory: praktikum_8

      - name: Upload a file to Google Drive
        uses: adityak74/google-drive-upload-git-action@main
        with:
          filename: ./praktikum_8/PRAKTIKUM_8.pdf
          credentials: ${{ secrets.CREDENTIALS }}
          folderId: ${{ secrets.FOLDER_ID }}
          overwrite: true 

@muzimuzhi
Copy link
Contributor

According to texlive doc,

Available platforms: 
=============================================================================== 
   a [ ] ...
   b [ ] MacOSX current (10.14-) on ARM/x86_64 (universal-darwin) 
   ...
   i [X] GNU/Linux on x86_64 (x86_64-linux) 

It's wired that universal-darwin was created on a ubuntu-latest runner. Maybe there are some macos-only command-line tool packages listed in your package file?

What would ls -l /home/runner/work/_temp/setup-texlive-action/2024/bin/universal-darwin list?

@izzalDev
Copy link
Author

What would ls -l /home/runner/work/_temp/setup-texlive-action/2024/bin/universal-darwin list?

BasicTeX Dependencies.txt

Yeah, I copied all the default packages from BasicTeX, and after removing the packages with the *.universal-darwin extension from the list, it worked fine.

It would be great if you could add validation for the package file.

Thanks, @muzimuzhi

@teatimeguest teatimeguest added the question Further information is requested label Nov 30, 2024
@teatimeguest
Copy link
Owner

Thank you for reporting the problem, @izzalDev. And thank you for investigating it, @muzimuzhi.

It would be great if you could add validation for the package file.

I have created a new issue on this feature (#332). I am a bit tied up right now with the end of the year looming, but will work on it in my free time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants