如何构建 GitBook

构建

要编译本书,请使用 Markdown Lab

小贴士

错误: getaddrinfo ENOTFOUND elinux.org

  1. $ gitbook pdf
  2. info: loading book configuration....
  3. warn: you should specify a gitbook version to use in your book.json, for example: 2.x.x
  4. info: OK
  5. info: >0 plugins loaded
  6. info: Parsing multilingual book, with 1 lanuages
  7. info: Preparing language book en
  8. info: loading book configuration....OK
  9. info: >0 plugins loaded
  10. info: start generation with pdf generator
  11. info: clean pdf generatorOK
  12. info: start generation with pdf generator
  13. info: clean pdf generatorOK
  14. stream.js:94
  15. throw er; // Unhandled stream error in pipe.
  16. ^
  17. Error: getaddrinfo ENOTFOUND elinux.org
  18. at errnoException (dns.js:44:10)
  19. at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:94:26)
  • 解决办法

    1. $ ping elinux.org
    2. PING elinux.org (140.211.15.183) 56(84) bytes of data.
    3. $ sudo -s
    4. $ echo "140.211.15.183 elinux.org" >> /etc/hosts