Closed Jonta closed 1 year ago
@Jonta Can you try the latest version available as a binary from here: https://github.com/psibi/tldr-hs/releases/tag/v0.9.0
(Still happens in 0.6.4)
@Jonta Can you try the latest version available as a binary from here: https://github.com/psibi/tldr-hs/releases/tag/v0.9.0
@psibi
tldr-linux-v0.9.0.tar.gz
tar xvf tldr-linux-v0.9.0.tar.gz
./tldr
tldr - Simplified and community-driven man pages
Usage: tldr [-v|--version] ((-u|--update) | [-p|--platform PLATFORM]
[-L|--language LOCALE] COMMAND | (-a|--about))
[--auto-update-interval DAYS]
tldr Client program
Available options:
-h,--help Show this help text
-v,--version Show version
-u,--update Update offline cache of tldr pages
-p,--platform PLATFORM Prioritize specfic platform while searching. Valid
values include linux, osx, windows, sunos
-L,--language LOCALE Preferred language for the page returned
COMMAND name of the command
-a,--about About this program
--auto-update-interval DAYS
Perform an automatic update if the cache is older
than DAYS
./tldr tar
No tldr entry for tar
./tldr -u
Downloading tldr pages to /home/jonta/.local/share/tldr
Segmentation fault (core dumped)
./tldr tar
No tldr entry for tar
~ ls ~/.local/share/tldr
[Empty directory]
How do I tell that release of tldr
to use the pages already stored there?
Downloading tldr pages to /home/jonta/.local/share/tldr
Segmentation fault (core dumped)
This sounds scary and seems to be something is going wrong. What OS are you in ?
How do I tell that release of tldr to use the pages already stored there?
By default it uses the locally cached pages. In your case, it doesn't seem to work because -u
has failed because of segmentation fault. Can you try again with -u
and see if it's reproducible ?
This sounds scary and seems to be something is going wrong. What OS are you in ?
Ubuntu 21.04
By default it uses the locally cached pages. In your case, it doesn't seem to work because
-u
has failed because of segmentation fault. Can you try again with-u
and see if it's reproducible ?
Reproducible
I ran an strace
on ./tldr -u
, and 99% of it seem to be blocks like this (repeated with I'm guessing all .md
-files):
stat("/home/jonta/.local/share/tldr/tldr/pages.de/common/git-apply.md", {st_mode=S_IFREG|0664, st_size=767, ...}) = 0
access("/home/jonta/.local/share/tldr/tldr/pages.de/common/git-apply.md", R_OK) = 0
access("/home/jonta/.local/share/tldr/tldr/pages.de/common/git-apply.md", W_OK) = 0
access("/home/jonta/.local/share/tldr/tldr/pages.de/common/git-apply.md", X_OK) = -1 EACCES (Permission denied)
stat("/home/jonta/.local/share/tldr/tldr/pages.de/common/git-apply.md", {st_mode=S_IFREG|0664, st_size=767, ...}) = 0
chmod("/home/jonta/.local/share/tldr/tldr/pages.de/common/git-apply.md", 0100764) = 0
lstat("/home/jonta/.local/share/tldr/tldr/pages.de/common/git-apply.md", {st_mode=S_IFREG|0764, st_size=767, ...}) = 0
unlink("/home/jonta/.local/share/tldr/tldr/pages.de/common/git-apply.md") = 0
Is it checking whether the .md
-files are executable? Ref. X_OK) = -1 EACCES (Permission denied)
@Jonta Thanks, the strace
output is quite helpful.
Do you have write permission for ~/.local/share/tldr
?
@Jonta Thanks, the
strace
output is quite helpful.Do you have write permission for
~/.local/share/tldr
?
@psibi
Ah, meant to include that
drwxrwxr-x
Both after ./tldr -u
and after tldr -u
(the latter restoring the cache)
The file above (~./local/share/tldr/tldr/pages.de/common/git-apply.md
) has -rw-rw-r--
@Jonta I just tested the master version in my machine and it seems to work (but I'm using NixOS). Can you try these things:
Can you check if that changes things for you ?
@Jonta I just tested the master version in my machine and it seems to work (but I'm using NixOS). Can you try these things:
rm -rf ~/.local/share/tldr/tldr tldr -u
Can you check if that changes things for you ?
@psibi After this, ./tldr
doesn't find pages, and ./tldr -u
segfaults again
The strace
s look very similar as well
tldr --version
0.9.2
Nice, thanks for the confirmation.
Expected:
Displays simple help pages for command-line tools, from the tldr-pages project. More information: https://tldr.sh.
Actual:
Displays simple help pages for command-line tools, from the tldr-pages project.More information: https://tldr.sh.
Version: 0.4.0.1-1build2 From
sudo apt get install tldr
on Ubuntu 20.04 LTS