holzschu / a-shell

A terminal for iOS, with multiple windows
BSD 3-Clause "New" or "Revised" License
2.73k stars 117 forks source link

Can’t install texlive #848

Open adamjclee opened 1 day ago

adamjclee commented 1 day ago

Hi,

Yesterday I was having some problems with (standard) fonts in texlive — figured a good first step would be to completely remove everything and re-install before trying to figure out exactly where the underlying problem was.

Having uninstalled and re-installed a-shell, I can no longer install texlive. Here is a copy-paste:

[~/Documents]$ latex
In order to use latex, you need to install the texlive distribution with 'pkg install texlive'.
[~/Documents]$ pkg install texlive
Package texlive not found
[~/Documents]$ pkg install texlive
Downloading texlive
/private/var/containers/Bundle/Application/462A0967-28D1-4D42-8BEE-1A6EB1012D73/a-Shell.app/bin/chmod: /private/var/mobile/Containers/Data/Application/7F26C0D4-F37B-4334-87B9-C2
B29249D793/tmp/texlive: No such file or directory
dash: 0: Can't open /private/var/mobile/Containers/Data/Application/7F26C0D4-F37B-4334-87B9-C2B29249D793/tmp/texlive
/private/var/containers/Bundle/Application/462A0967-28D1-4D42-8BEE-1A6EB1012D73/a-Shell.app/bin/rm: /private/var/mobile/Containers/Data/Application/7F26C0D4-F37B-4334-87B9-C2B29
249D793/tmp/texlive: No such file or directory
Done
[~/Documents]$ 
holzschu commented 1 day ago

I can explain the strikethrough: in Markdown, ~ is used to encode strikethrough like this (entered as "\~\~like this\~\~"). You can avoid it by creating a shell quote with "```":

[~/Documents] latex

(entered as "```sh[return] text [return] ```".

What I can't explain is the issue with pkg install. After "Downloading texlive", you should have seen "Downloading the texlive-2024 distribution (this may take a while)", followed by 3 lines of curl output. The fact that neither of these appeared is really weird. I don't see it on my own machine.

Looking more closely at the errors, the issue is that the pkg command was unable to download the "texlive" install script. If that is the case, you should be unable to install other commands as well (try "pkg install banner", for example).

adamjclee commented 1 day ago

Thanks. Yeah, I get a very similar error:

[~/Documents]$ pkg install banner
Downloading banner
chmod: /private/var/mobile/Containers/Data/Application/7F26C0D4-F37B-4334-87B9-C2B29249D793/Documents/bin/banner: No such file or directory
Done
[~/Documents]$ 
holzschu commented 1 day ago

So, it seems that curl is unable to download the package information. This is where I regret using the "--silent" option in "pkg" to avoid the clutter on the screens. The command:

curl -L https://raw.githubusercontent.com/holzschu/a-Shell-commands/master/packages/banner -o ~/tmp/banner --silent

is failing (silently). Can you try without the "--silent"?

curl -L https://raw.githubusercontent.com/holzschu/a-Shell-commands/master/packages/banner -o ~/tmp/banner

This should tell us why it isn't working, with a usable error message.

adamjclee commented 1 day ago

Curl seems to download everything fine, but it still fails:


[~/Documents]$ curl -L https://raw.githubusercontent.com/holzschu/a-Shell-commands/master/packages/banner -o ~/tmp/banner
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   691  100   691    0     0   2618      0 --:--:-- --:--:-- --:--:--  2627
[~/Documents]$ pkg install banner
Downloading banner
chmod: /private/var/mobile/Containers/Data/Application/7F26C0D4-F37B-4334-87B9-C2B29249D793/Documents/bin/banner: No such file or directory
Done
[~/Documents]$  ```
holzschu commented 1 day ago

Ah wait, that's a different issue (I changed something with banner yesterday, that's what's causing the error message you are seeing). I have fixed the issue, but that actually tells us that curl worked for banner (since it downloaded the file where there is the error, based on the error message). The error message says there's an issue with Documents/bin/banner (the installed executable), not with ~/tmp/banner (the script that contains the installation instructions). Whereas your original error message with texlive references ~/tmp/texlive (the script that contains the installation instruction).

So, back to basics: it worked with banner (in the sense that it downloaded the installation instruction), why doesn't it work with texlive? Can you retry pkg install texlive? And if it fails,

curl -L https://raw.githubusercontent.com/holzschu/a-Shell-commands/master/packages/texlive -o ~/tmp/texlive
adamjclee commented 1 day ago

Ok, well now it downloads and installs without problem — slightly odd, but it works so all good. Thanks for your help!