tldr doesn't work

cburkins

Member
Nov 5, 2020
16
1
6
52
Love "tldr" on all my linux machines, so figured I would install it on Proxmox VE, which is just Debian 11 after all.

Doesn't seem to work, tldr pages aren't available

Code:
root@red:~# apt install tldr                                                                                                                                                                          
Reading package lists... Done                                                                                                                                                                         
Building dependency tree... Done                                                                                                                                                                      
Reading state information... Done                                                                                                                                                                     
The following NEW packages will be installed:                                                                                                                                                         
  tldr                                                                                                                                                                                                
0 upgraded, 1 newly installed, 0 to remove and 22 not upgraded.                                                                                                                                       
Need to get 529 kB of archives.                                                                                                                                                                       
After this operation, 2,899 kB of additional disk space will be used.                                                                                                                                 
Get:1 http://ftp.us.debian.org/debian bullseye/main amd64 tldr amd64 0.6.4-1+b2 [529 kB]                                                                                                              
Fetched 529 kB in 0s (1,879 kB/s)                                                                                                                                                                     
Selecting previously unselected package tldr.                                                                                                                                                         
(Reading database ... 58695 files and directories currently installed.)                                                                                                                               
Preparing to unpack .../tldr_0.6.4-1+b2_amd64.deb ...                                                                                                                                                 
Unpacking tldr (0.6.4-1+b2) ...                                                                                                                                                                       
Setting up tldr (0.6.4-1+b2) ...                                                                                                                                                                      
update-alternatives: using /usr/bin/tldr-hs to provide /usr/bin/tldr (tldr) in auto mode                                                                                                              
Processing triggers for man-db (2.9.4-2) ...                                                                                                                                                          

                                                                                                                                                          
root@red:~#                                                                                                                                                                                           
root@red:~# tldr ls                                                                                                                                                                                   
No tldr entry for ls                                                                                                                                                                                  
root@red:~#

So did some googling, and tried to update the local cache of pages (which usually isn't needed). But that seems broken too...

Code:
root@red:~#                                                                                                                                                                                           
root@red:~# tldr --update                                                                                                                                                                             
tldr: /root/.local/share/tldr: createDirectory: does not exist (No such file or directory)                                                                                                            
root@red:~#
So I gave it a helping hand...

Code:
root@red:~# mkdir -p ~root/.local/share                                                                                                                                                               
root@red:~#                                                                                                                                                                                           
root@red:~# tldr --update                                                                                                                                                                             
Cloning into 'tldr'...                                                                                                                                                                                
remote: Enumerating objects: 67190, done.                                                                                                                                                             
remote: Counting objects: 100% (2/2), done.                                                                                                                                                           
remote: Compressing objects: 100% (2/2), done.                                                                                                                                                        
remote: Total 67190 (delta 0), reused 1 (delta 0), pack-reused 67188                                                                                                                                  
Receiving objects: 100% (67190/67190), 16.66 MiB | 13.66 MiB/s, done.                                                                                                                                 
Resolving deltas: 100% (41042/41042), done.                                                                                                                                                           
root@red:~#                                                                                                                                                                                           
root@red:~#


And now it seems to work just fine:

Code:
root@red:~# tldr ls                                                                                                                                                                                   
ls                                                                                                                                                                                                    
List directory contents.More information: https://www.gnu.org/software/coreutils/ls.                                                                                                                  
                                                                                                                                                                                                      
 - List files one per line:                                                                                                                                                                           
   ls -1                                                                                                                                                                                              
                                                                                                                                                                                                      
 - List all files, including hidden files:                                                                                                                                                            
   ls -a                                                                                                                                                                                              
                                                                                                                                                                                                      
 - List all files, with trailing / added to directory names:                                                                                                                                          
   ls -F                                                                                                                                                                                              
                                                                                                                                                                                                      
 - Long format list (permissions, ownership, size, and modification date) of all files:                                                                                                               
   ls -la                                                                                                                                                                                             
                                                                                                                                                                                                      
 - Long format list with size displayed using human-readable units (KiB, MiB, GiB):                                                                                                                   
   ls -lh                                                                                                                                                                                             
                                                                                                                                                                                                      
 - Long format list sorted by size (descending):                                                                                                                                                      
   ls -lS                                                                                                                                                                                             
                                                                                                                                                                                                      
 - Long format list of all files, sorted by modification date (oldest first):                                                                                                                         
   ls -ltr                                                                                                                                                                                            
                                                                                                                                                                                                      
 - Only list directories:                                                                                                                                                                             
   ls -d */                                                                                                                                                                                           
root@red:~#


I realize I kind of found my own solution, but I'd like to try and understand why this doesn't work as it should.
 
In case it's helpful, a bit of info on my environment:


Code:
root@red:~# cat /etc/os-release                                                                                                                                                                       
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"                                                                                                                                                          
NAME="Debian GNU/Linux"                                                                                                                                                                               
VERSION_ID="11"                                                                                                                                                                                       
VERSION="11 (bullseye)"                                                                                                                                                                               
VERSION_CODENAME=bullseye                                                                                                                                                                             
ID=debian                                                                                                                                                                                             
HOME_URL="https://www.debian.org/"                                                                                                                                                                    
SUPPORT_URL="https://www.debian.org/support"                                                                                                                                                          
BUG_REPORT_URL="https://bugs.debian.org/"                                                                                                                                                             
root@red:~#                                                                                                                                                                                           
root@red:~#                                                                                                                                                                                           
root@red:~#                                                                                                                                                                                           
root@red:~# pveversion                                                                                                                                                                                
pve-manager/7.2-11/b76d3178 (running kernel: 5.15.60-1-pve)                                                                                                                                           
root@red:~#
 
Just a guess since I've never heard of tldr before, but it would appear that Debian doesn't ship the actual pages, just the client app. The fact that apt shows the installed size as only 529 kB would tend to indicate that as well.
 
Thanks for your quick reply, Bob. You didn't really ask, but "tldr" is an abbreviated version of the man pages. Shows you the "useful" version of super long man pages, kinda handy. And yes, you're right, usually, the first time you run tldr, it grabs (and caches) a copy of the popular tldr pages. On most distros, it just works. The first time you run it, you can see tldr is downloading a cache of pages (shows a few lines in the output).

On debian, can't figure out why it expects to find ~/.local/share and then refuses to create the direct on it's own... Will google a bit on that second point you made..... Also might create a quick generic Debian VM to see if stock debian behaves any differently than Proxmox.
 
Thanks for your quick reply, Bob. You didn't really ask, but "tldr" is an abbreviated version of the man pages. Shows you the "useful" version of super long man pages, kinda handy. And yes, you're right, usually, the first time you run tldr, it grabs (and caches) a copy of the popular tldr pages. On most distros, it just works. The first time you run it, you can see tldr is downloading a cache of pages (shows a few lines in the output).

On debian, can't figure out why it expects to find ~/.local/share and then refuses to create the direct on it's own... Will google a bit on that second point you made..... Also might create a quick generic Debian VM to see if stock debian behaves any differently than Proxmox.
Booted into a debian liveOS, and tried same. Same result as above. You have to manually create ~root/.local/share. Weird.
 
You can check bug reports at https://bugs.debian.org and can report a bug by using the "reportbug" tool.

FWIW, most of the time ~/.local/share will already have been created by your desktop environment. Most of the directories in ~/.local on this machine are related to desktop apps. Proxmox does not install a desktop so maybe that's why nobody else has reported this (I checked).
 
Doesn't seem to work, tldr pages aren't available
<snip>
So did some googling, and tried to update the local cache of pages (which usually isn't needed). But that seems broken too...
Code:
root@red:~#                                                                                                                                                                                         
root@red:~# tldr --update                                                                                                                                                                           
tldr: /root/.local/share/tldr: createDirectory: does not exist (No such file or directory)                                                                                                          
root@red:~#

So I gave it a helping hand...
Code:
root@red:~# mkdir -p ~root/.local/share                                                                                                                                                             
root@red:~#                                                                                                                                                                                         
root@red:~# tldr --update                                                                                                                                        
<snip>
<snip>
I know this is from a couple of years ago, but did you really mean you did that mkdir?
Code:
mkdir -p ~root/.local/share

I found that it needed to name the tldr folder, as in:
Code:
mkdir -p ~root/.local/share/tldr

Otherwise I got the same error you originally noted there, when I tried to do the tldr --update.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!