tealdeer-rs / tealdeer

A very fast implementation of tldr in Rust.
https://tealdeer-rs.github.io/tealdeer/
Apache License 2.0
4.17k stars 123 forks source link

Error: Could not update cache #304

Closed ShengYenPeng closed 1 year ago

ShengYenPeng commented 1 year ago

Hi :)

When I execute : tldr -u,

I got following message:

Error: Could not update cache

Caused by:
    0: error sending request for url (https://tldr.sh/assets/tldr.zip): error trying to connect: dns error: failed to lookup address information: Name or service not known
    1: error trying to connect: dns error: failed to lookup address information: Name or service not known
    2: dns error: failed to lookup address information: Name or service not known
    3: failed to lookup address information: Name or service not known

Should I do some setting or try something to narrow down the issue?

------ Version Information -----

tealdeer version: 1.6.1

OS: CentOS Linux release 7.3.1611
ShengYenPeng commented 1 year ago

It may relate to company's web setting, I can not use wget or curl get zip from https://tldr.sh/assets/tldr.zip

wget:

wget https://tldr.sh/assets/tldr.zip
--2022-12-16 12:20:06--  https://tldr.sh/assets/tldr.zip
Resolving tldr.sh (tldr.sh)... failed: Name or service not known.
wget: unable to resolve host address 'tldr.sh'

curl:

curl https://tldr.sh/assets/tldr.zip
curl: (6) Could not resolve host: tldr.sh; Name or service not known
ShengYenPeng commented 1 year ago

I can get https://tldr.sh/assets/tldr.zip and copy it to working environment, can I update tldr with this zip?

dbrgn commented 1 year ago

Use the command tldr --show-paths to list the paths used. On my system, the "Cache dir" is here: /home/danilo/.cache/tealdeer

This means that you can unpack the ZIP file so that the directory looks like this:

/home/danilo/.cache/tealdeer/
└── tldr-pages
    ├── index.json
    ├── LICENSE.md
    ├── pages
    ├── pages.ar
    ├── pages.bn
    ...