• 安装tldr


    安装tldr

    1. 执行命令安装tldr

      sudo apt-get install nodejs

      sudo apt-get install npm

      sudo npm install -g tldr

      安装失败,提示:

      WARN engine tldr@3.3.7: wanted: {"node":">=6.12.0"} (current: {"node":"4.2.6","npm":"3.5.2"})
      WARN engine tldr@3.3.7: wanted: {"node":">=6.12.0"} (current: {"node":"4.2.6","nloadDep:ora → 200         ▀ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
      WARN engine chalk@4.1.2: wanted: {"node":">=10"} (current: {"node":"4.2.6","npm":"3.5.2"})
      WARN engine fs-extra@9.1.0: wanted: {"node":">=10"} (current: {"node":"4.2.6","nloadDep:ora → addNamed    ▐ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
      WARN engine ora@5.4.1: wanted: {"node":">=10"} (current: {"node":"4.2.6","npm":"loadDep:ora → fetch       ▀ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
      WARN engine marked@2.1.3: wanted: {"node":">= 10"} (current: {"node":"4.2.6","nploadDep:ora → 200         ▄ ╢██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
      WARN engine commander@6.2.1: wanted: {"node":">= 6"} (current: {"node":"4.2.6","loadDep:supports-color →  ▄ ╢███████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
      WARN engine supports-color@7.2.0: wanted: {"node":">=8"} (current: {"node":"4.2.6","npm":"3.5.2"})
      WARN engine ansi-styles@4.3.0: wanted: {"node":">=8"} (current: {"node":"4.2.6",loadDep:color-convert → 2 ▄ ╢███████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
      WARN engine color-convert@2.0.1: wanted: {"node":">=7.0.0"} (current: {"node":"4loadDep:has-flag → 200    ▄ ╢███████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
      WARN engine has-flag@4.0.0: wanted: {"node":">=8"} (current: {"node":"4.2.6","nploadDep:universalify → ge ▌ ╢████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
      WARN engine universalify@2.0.0: wanted: {"node":">= 10.0.0"} (current: {"node":"npm ERR! Linux 4.15.0-142-generic
      npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "tldr"
      npm ERR! node v4.2.6
      npm ERR! npm  v3.5.2
      npm ERR! code EMISSINGARG
      
      npm ERR! typeerror Error: Missing required argument #1
      npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
      npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
      npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
      npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
      npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
      npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
      npm ERR! typeerror     at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
      npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
      npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
      npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
      npm ERR! typeerror This is an error with npm itself. Please report this error at:
      npm ERR! typeerror     <http://github.com/npm/npm/issues>
      
      npm ERR! Please include the following file with any support request:
      npm ERR!     /home/lux/npm-debug.log
      
      
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34

      ​ 错误原因:nodejs版本太低

    2. 执行命令,升级nodejs

      sudo apt-get install nodejs-legacy

      sudo npm install -g n

      sudo n latest

      sudo node -v查看nodejs版本号

      升级失败:提示

      node: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by node)
      node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by node)
      node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
      
      
      • 1
      • 2
      • 3
      • 4

      我用的是16.4这个版本的nodejs不支持

    3. 执行命令

      sudo n stable

      sudo node -v

      查看版本号正常v16.16.0

    4. 安装tldr

      sudo npm install -g tldr

    5. 更新tldr

      tldr --update

    6. 尝试使用tdlr

      tdlr tar

  • 相关阅读:
    数据挖掘实战(6)——文本分类(今日头条tnews数据集)
    ActiveState Platform - November 2022
    【无标题】
    关于XXLJOB集群模式下调度失败的问题
    【数学建模】层次分析
    Https中间人攻击
    【BOOST C++ 5 】通信(05 windows相关的对象 )
    k8s Metallb簡單入門示例
    使用php实现pc端和移动端分离
    java计算机毕业设计大学生兼职网站源码+系统+lw文档+mysql数据库+部署
  • 原文地址:https://blog.csdn.net/weixin_43739167/article/details/126130591