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

Installation on Ubuntu 20.04 LTS on Windows Subsystem for Linux (WSL) #40

Open
schorschie opened this issue Oct 6, 2020 · 9 comments
Open

Comments

@schorschie
Copy link

Hello,
I've installed a fresh Ubuntu Subsystem and runt he script with the following result:

[sudo] password for schorschie:
install-tl-ubuntu: checking for TeX Live environment variables...
install-tl-ubuntu: running apt and dpkg commands...
install-tl-ubuntu: determining the fastest repository...
install-tl-ubuntu: the fastest repo is: http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan
install-tl-ubuntu: downloading and extracting install-tl for time number 1...
install-tl-ubuntu: install-tl downloaded and extracted successfully.
install-tl-ubuntu: starting install-tl for time number 1...
install-tl-ubuntu: going to run the following command:
        echo "i" | ./install-tl -repository "http://vesta.informatik.rwth-aachen.de/ftp/pub/mirror/ctan/systems/texlive/tlnet/" -v  -logfile "/home/schorschie/install-tl-1.log"
         progress: [4057/4068, time/total: 14:54/14:54]
                   running config scripts (could take up to 10 mins)...
install-tl-ubuntu: install-tl finished successfully.
install-tl-ubuntu: linking...
install-tl-ubuntu: WARNING: previous TeX Live install detected. Link will be updated so
  that the newer installation is used. However, the old installation will not be removed
  by this script, so if you are concerned about space, please consider removing the old
  TeX Live directory. If space if not a concern, no action is needed.
install-tl-ubuntu: installing Evince AppArmor fix for TeX Live fonts...
install-tl-ubuntu: installing tlmgr.desktop...
ln: failed to create symbolic link 'UbuntuTexDir': File exists
install-tl-ubuntu: running texhash...
install-tl-ubuntu: texhash was successful.
install-tl-ubuntu: Tue Oct  6 11:13:10 CEST 2020: Finished (all successful).
install-tl-ubuntu: you might need to restart your computer
  so that your PATH (in /etc/environment) will be sourced.

It seems, that everything worked. I rebooted the computer and restarted the wls, but:

schorschie@DESKTOP-1H52M59:~$ pdflatex

Command 'pdflatex' not found, but can be installed with:

sudo apt install texlive-latex-base

Any Idea what's wrong?

regards
Gregory

@scottkosty
Copy link
Owner

Hi Gregory,

First, I'm sorry for the problems. A few thoughts:

  1. The script thinks that you had a previous installation of TeX Live. Can you confirm this is the case?
  2. Please give the output from the following commands:
echo $PATH
cat /etc/environment
ls /opt/textbin
file /opt/texbin/pdftex
ls /usr/local/texlive/

Additionally, I'm not familar with how Ubuntu on WSL works. Is there any important differences compared to a direct Ubuntu 20.04 that you think could be relevant? I don't currently have time to research this myself.

@schorschie
Copy link
Author

Hi Scott,

sorry it took me so long and thanks for helping me. So here is the output, I think the issue is the missing directory in the $PATH file, which folder should I include, is /opt/texbin sufficient?

schorschie@DESKTOP-1H52M59:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu20.04onWindows_2004.2020.812.0_x64__79rhkp1fndgsc:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Program Files/ImageMagick-7.0.10-Q16-HDRI:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Ruby26-x64/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files (x86)/Brackets/command:/mnt/c/Program Files (x86)/GnuPG/bin:/mnt/c/Users/grzeg/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/grzeg/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/texlive/2019/bin/win32:/mnt/c/Users/grzeg/Anaconda3/Library/bin:/mnt/c/Users/grzeg/Anaconda3/Scripts:/mnt/c/Users/grzeg/Anaconda3/condabin:/mnt/c/Users/grzeg/AppData/Local/atom/bin:/mnt/c/Users/grzeg/AppData/Local/GitHubDesktop/bin:/snap/bin
schorschie@DESKTOP-1H52M59:~$ cat /etc/environment
PATH="/opt/texbin:/opt/texbin:/opt/texbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
schorschie@DESKTOP-1H52M59:~$ ls /opt/textbin
ls: cannot access '/opt/textbin': No such file or directory
schorschie@DESKTOP-1H52M59:~$ ls /opt/texbin
a2ping            deweb            htxetex                   mfluajit-nowin     platex-dev        texhash
a5toa4            diadia           includeres                mfplain            pltotf            texindy
adhocfilelist     disdvi           inimf                     mft                pmpost            texlinks
afm2afm           dosepsbin        initex                    mk4ht              pmxab             texliveonfly
afm2pl            dt2dv            installfont-tl            mkgrkindex         pmxchords         texloganalyser
afm2tfm           dtxgen           jadetex                   mkindex            pn2pdf            texlua
aleph             dv2dt            jamo-normalize            mkjobtexmf         pooltype          texluac
allcm             dvi2fax          jfmutil                   mkocp              ppltotf           texluajit
allec             dvi2tty          kanji-config-updmap       mkofm              prepmx            texluajitc
allneeded         dviasm           kanji-config-updmap-sys   mkpic              ps2eps            texmfstart
amstex            dvibook          kanji-config-updmap-user  mkt1font           ps2frag           texosquery
arara             dviconcat        kanji-fontmap-creator     mktexfmt           ps2pk             texosquery-jre5
arlatex           dvicopy          ketcindy                  mktexlsr           ps4pdf            texosquery-jre8
asy               dvidvi           komkindex                 mktexmf            psbook            texplate
authorindex       dvigif           kpseaccess                mktexpk            psjoin            texsis
autoinst          dvihp            kpsepath                  mktextfm           pslatex           tftopl
autosp            dviinfox         kpsereadlink              mllatex            psnup             thumbpdf
axohelp           dvilj            kpsestat                  mltex              psresize          tie
bbl2bib           dvilj2p          kpsetool                  mmafm              psselect          tikztosvg
bbox              dvilj4           kpsewhere                 mmpfb              pst2pdf           tlcockpit
bg5+latex         dvilj4l          kpsewhich                 mpost              pstops            tlmgr
bg5+pdflatex      dvilj6           kpsexpand                 mptopdf            ptex              tlshell
bg5conv           dvilualatex      l3build                   msxlint            ptex2pdf          tpic2pdftex
bg5latex          dvilualatex-dev  lacheck                   mtxrun             ptftopl           ttf2afm
bg5pdflatex       dviluatex        latex                     mtxrunjit          purifyeps         ttf2kotexfont
bib2gls           dvipdfm          latex-dev                 multibibliography  pygmentex         ttf2pk
bibdoiadd         dvipdfmx         latex-git-log             musixflx           pythontex         ttf2tfm
biber             dvipdft          latex-papersize           musixtex           r-mpost           ttfdump
bibexport         dvipng           latex2man                 odvicopy           r-pmpost          ttftotype42
bibmradd          dvipos           latex2nemeth              odvitype           r-upmpost         typeoutfileinfo
bibtex            dvips            latexdef                  ofm2opl            repstopdf         ulqda
bibtex8           dvired           latexdiff                 omfonts            rpdfcrop          upbibtex
bibtexu           dviselect        latexdiff-vc              opl2ofm            rubibtex          updmap
biburl2doi        dvispc           latexfileversion          optex              rubikrotation     updmap-sys
bibzbladd         dvisvgm          latexindent               ot2kpx             rumakeindex       updmap-user
bundledoc         dvitodvi         latexmk                   otangle            rungs             updvitomp
cachepic          dvitomp          latexpand                 otfinfo            scor2prt          updvitype
cef5conv          dvitype          latexrevise               otftotfm           simpdftex         uplatex
cef5latex         e2pall           lily-glyph-commands       otp2ocp            sjisconv          uplatex-dev
cef5pdflatex      ebb              lily-image-commands       outocp             sjislatex         upmendex
cefconv           ebong            lily-rebuild-pdfs         ovf2ovp            sjispdflatex      upmpost
ceflatex          eplain           listbib                   ovp2ovf            spix              uppltotf
cefpdflatex       epsffit          listings-ext.sh           pamphletangler     splitindex        uptex
cefsconv          epspdf           llmk                      patgen             srcredact         uptftopl
cefslatex         epspdftk         lollipop                  pbibtex            sty2dtx           urlbst
cefspdflatex      epstopdf         ltx2crossrefxml           pdfannotextractor  svn-multi         utf8mex
cfftot1           eptex            ltxfileinfo               pdfatfi            synctex           vftovp
checkcites        etex             ltximg                    pdfbook2           t1ascii           vlna
checklistings     euptex           luacsplain                pdfclose           t1asm             vpe
chkdvifont        exceltex         luahbtex                  pdfcrop            t1binary          vpl2ovp
chklref           extconv          luajithbtex               pdfcslatex         t1disasm          vpl2vpl
chktex            extractbb        luajittex                 pdfcsplain         t1dotlessj        vptovf
chkweb            extractres       lualatex                  pdfetex            t1lint            weave
cjk-gs-integrate  fig4latex        lualatex-dev              pdfjadetex         t1mac             webquiz
cllualatex        findhyph         luaotfload-tool           pdfjam             t1rawafm          wofm2opl
cluttex           fmtutil          luatex                    pdflatex           t1reencode        wopl2ofm
clxelatex         fmtutil-sys      luatools                  pdflatex-dev       t1testpage        wordcount
context           fmtutil-user     lwarpmk                   pdflatexpicscale   t1unmac           wovf2ovp
contextjit        fontinst         m-tx                      pdfmex             t4ht              wovp2ovf
convbkmk          fragmaster       mag                       pdfopen            tangle            xasy
convertgls2bib    gbklatex         make4ht                   pdftex             teckit_compile    xdvi
cslatex           gbkpdflatex      makedtx                   pdftex-quiet       tex               xdvi-xaw
csplain           getmapdl         makeglossaries            pdftosrc           tex2aspc          xdvipdfmx
ctan-o-mat        gftodvi          makeglossaries-lite       pdfxmltex          tex2xindy         xelatex
ctanbib           gftopk           makeindex                 pdfxup             tex4ebook         xelatex-dev
ctangle           gftype           makejvf                   pdvitomp           tex4ht            xetex
ctanify           git-latexdiff    man                       pdvitype           texconfig         xhlatex
ctanupload        gregorio         match_parens              pedigree           texconfig-dialog  xindex
ctie              gsftopk          mathspic                  perltex            texconfig-sys     xindy
ctwill            hbf2gf           mendex                    pfarrei            texcount          xindy.mem
ctwill-refsort    ht               mex                       pfb2pfa            texdef            xindy.run
ctwill-twinx      htcontext        mf                        pk2bm              texdiff           xmltex
cweave            htlatex          mf-nowin                  pkfix              texdirflatten     yplan
de-macro          htmex            mf2pt1                    pkfix-helper       texdoc
depythontex       httex            mflua                     pktogf             texdoctk
detex             httexi           mflua-nowin               pktype             texexec
devnag            htxelatex        mfluajit                  platex             texfot
schorschie@DESKTOP-1H52M59:~$ file /opt/texbin/pdflatex
/opt/texbin/pdflatex: symbolic link to pdftex
schorschie@DESKTOP-1H52M59:~$ ls /usr/local/textlive
ls: cannot access '/usr/local/textlive': No such file or directory
schorschie@DESKTOP-1H52M59:~$ ls /usr/local/texlive
2020  texmf-local
schorschie@DESKTOP-1H52M59:~$       

@scottkosty
Copy link
Owner

Thank you for your response. Sorry for the typo with textbin. I think you're right about the PATH. Yes, please include the /opt/texbin in your PATH. Including that folder should be sufficient.

In which file do you set your PATH? Can you give the line of code that sets it?

@schorschie
Copy link
Author

schorschie@DESKTOP-1H52M59:~$ tail .bashrc
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

export PATH=$PATH:/opt/texbin

@scottkosty
Copy link
Owner

Does everything work fine now? Does /opt/texbin show up in your PATH when you echo it?

@beardedhog
Copy link

Faced this issue, can confirm that modifying .bashrc in the way proposed by @schorschie solves it for me.

@scottkosty
Copy link
Owner

From what I understand, for some reason the Windows Subsystem for Linux does not source /etc/environment in new bash instances. The following seems related:

microsoft/WSL#1405

@beardedhog just to double-check: you are indeed on Windows Subsystem for Linux, right? Which Ubuntu version? Also, what is a command I can run that would tell me if the installation is a Windows Subsystem for Linux? With a command, we can try to provide a workaround for this issue.

@beardedhog
Copy link

Tested with Windows 10 builds 20H2 and 21390 and Ubuntu-20.04 in both 1 and 2 WSL versions.
I believe at the time the recommended workaround is to check the contents of certain files, take a look at microsoft/WSL#423, microsoft/WSL#4071.

@scottkosty
Copy link
Owner

@beardedhog great, thanks! No idea when I will have enough time to get to this but at least now I think I have enough information for whenever I do.

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

No branches or pull requests

3 participants