Jetbrains Datalore 가상 머신에 TeX Live를 설치하려고 합니다. 처음 시작하면 가상 머신은 init.sh
Datalore GUI를 통해 편집/업로드할 수 있는 스크립트 파일을 자동으로 실행합니다.
이 내 꺼야init.sh
#!/bin/bash
# This shell script runs when the machine starts,
# before the user-installed packages are set up.
#
# Use it to install additional dependencies.
#
# Examples:
#
# sudo apt update && sudo apt install -y some-package
#
# pip install some-package --additional-arguments
#
# The logs are stored in /tmp/log;
# the error log is copied to Notebook files.
#!/bin/bash
# This shell script runs when the machine starts,
# before the user-installed packages are set up.
#
# Use it to install additional dependencies.
#
# Examples:
#
# sudo apt update && sudo apt install -y some-package
#
# pip install some-package --additional-arguments
#
# The logs are stored in /tmp/log;
# the error log is copied to Notebook files.
#!/bin/bash
# This shell script runs when the machine starts,
# before the user-installed packages are set up.
#
# Use it to install additional dependencies.
#
# Examples:
#
# sudo apt update && sudo apt install -y some-package
#
# pip install some-package --additional-arguments
#
# The logs are stored in /tmp/log;
# the error log is copied to Notebook files.
sudo apt update -y &&
sudo rm -rf tmp_latex/
sudo mkdir tmp_latex &&
cd tmp_latex &&
sudo wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz &&
sudo tar -xf install-tl-unx.tar.gz --no-same-owner &&
sudo rm install-tl-unx.tar.gz &&
cd install-tl-* &&
sudo wget https://gist.githubusercontent.com/prenone/bebaa5db68dd3e458dccbcefeb596bf3/raw/5e5590abffccbea76f69881fa3ce771d56912013/texlive.profile &&
sudo ./install-tl -profile texlive.profile -no-interaction &&
sudo tlmgr init-usertree &&
sudo tlmgr install amsmath &&
sudo tlmgr install cm-super &&
sudo tlmgr install underscore &&
sudo tlmgr install type1cm &&
sudo tlmgr install dvipng &&
sudo apt install dvipng -y &&
cd ../.. &&
sudo rm -rf tmp_latex/
셸에서 각 명령을 개별적으로 실행하면 모든 것이 잘 작동하고 TeX Live가 필요한 패키지와 함께 성공적으로 설치됩니다. 그러나 시작 시 스크립트가 실행되면 다음과 같은 오류 로그가 나타납니다.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
--2023-03-25 13:28:22-- https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
Resolving mirror.ctan.org (mirror.ctan.org)... 5.35.249.60
Connecting to mirror.ctan.org (mirror.ctan.org)|5.35.249.60|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://ftp.heanet.ie/mirrors/ctan.org/tex/systems/texlive/tlnet/install-tl-unx.tar.gz [following]
--2023-03-25 13:28:22-- https://ftp.heanet.ie/mirrors/ctan.org/tex/systems/texlive/tlnet/install-tl-unx.tar.gz
Resolving ftp.heanet.ie (ftp.heanet.ie)... 193.1.193.10, 2001:770:18:aa40::c101:c10a
Connecting to ftp.heanet.ie (ftp.heanet.ie)|193.1.193.10|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5737490 (5.5M) [application/x-gzip]
Saving to: ‘install-tl-unx.tar.gz’
0K .......... .......... .......... .......... .......... 0% 19.6M 0s
50K .......... .......... .......... .......... .......... 1% 11.8M 0s
# ... more wget progress output ...
5550K .......... .......... .......... .......... .......... 99% 79.8M 0s
5600K ... 100% 21.7M=0.1s
2023-03-25 13:28:22 (37.0 MB/s) - ‘install-tl-unx.tar.gz’ saved [5737490/5737490]
--2023-03-25 13:28:24-- https://gist.githubusercontent.com/prenone/bebaa5db68dd3e458dccbcefeb596bf3/raw/5e5590abffccbea76f69881fa3ce771d56912013/texlive.profile
Resolving gist.githubusercontent.com (gist.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.109.133, ...
Connecting to gist.githubusercontent.com (gist.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 933 [text/plain]
Saving to: ‘texlive.profile’
0K 100% 49.0M=0s
2023-03-25 13:28:24 (49.0 MB/s) - ‘texlive.profile’ saved [933/933]
./install-tl: could not run ./tlpkg/installer/config.guess, cannot proceed, sorry at tlpkg/TeXLive/TLUtils.pm line 372.
파일을 수동으로 실행하려고 하면(Datalore가 파일을 자동화한 후) sudo bash init.sh
다른 오류가 발생하고 ./install-lt가 출력되지 않는 것 같습니다.
# ...
texlive.profile 100%[=======================================================>] 933 --.-KB/s in 0s
2023-03-25 13:31:31 (4.39 MB/s) - ‘texlive.profile’ saved [933/933]
sudo: tlmgr: command not found