2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS上にRe:VIEW環境を構築する (Ubuntu20.04 + Re:VIEW5.3)

Last updated at Posted at 2021-12-14

「AWS上にRe:VIEW環境を構築する」
https://qiita.com/nanbuwks/items/da9136f1b6f789aaffcf
では、Ubuntu 16.04 AMD64 上に Re:VIEW Ver.2系をインストールしました。

今回は、2021年12月14日現在に使える組み合わせで構築を試しました。

環境

  • AMAZON AWS t2.micro
  • 1VCPU
  • 1GIB
  • EBS のみ
  • Ubuntu 20.04 AMD64
  • Ruby 2.7

Ruby インストール

Ubuntu 付属の Ruby と Rails をインストールします。


$ sudo apt install ruby-full
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  fonts-lato javascript-common libgmp-dev libgmpxx4ldbl libjs-jquery
  libruby2.7 rake ri ruby ruby-dev ruby-minitest ruby-net-telnet
  ruby-power-assert ruby-test-unit ruby-xmlrpc ruby2.7 ruby2.7-dev ruby2.7-doc
  rubygems-integration unzip zip
Suggested packages:
  apache2 | lighttpd | httpd gmp-doc libgmp10-doc libmpfr-dev bundler
The following NEW packages will be installed:
  fonts-lato javascript-common libgmp-dev libgmpxx4ldbl libjs-jquery
  libruby2.7 rake ri ruby ruby-dev ruby-full ruby-minitest ruby-net-telnet
  ruby-power-assert ruby-test-unit ruby-xmlrpc ruby2.7 ruby2.7-dev ruby2.7-doc
  rubygems-integration unzip zip
0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded.
Need to get 9908 kB of archives.
After this operation, 58.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

これで入る Ruby は2.7。 rubygems-integration とあるので、 gem も使えるようになるのかな?

$  sudo apt install rails
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  chromium-browser chromium-chromedriver libc-ares2 libjs-coffeescript
  libjs-jquery-ui libjs-source-map libjs-uglify libnode64 node-turbolinks
  nodejs nodejs-doc puma ruby-actioncable ruby-actionmailer ruby-actionpack
  ruby-actionview ruby-activejob ruby-activemodel ruby-activerecord
  ruby-activestorage ruby-activesupport ruby-addressable ruby-archive-zip
  ruby-arel ruby-atomic ruby-bindex ruby-bootsnap ruby-builder ruby-bundler
  ruby-byebug ruby-capybara ruby-childprocess ruby-chromedriver-helper
  ruby-coffee-rails ruby-coffee-script ruby-coffee-script-source
  ruby-columnize ruby-concurrent ruby-crass ruby-erubi ruby-execjs ruby-ffi
  ruby-globalid ruby-hike ruby-i18n ruby-io-like ruby-jbuilder
  ruby-jquery-rails ruby-listen ruby-loofah ruby-mail ruby-marcel
  ruby-method-source ruby-mimemagic ruby-mini-mime ruby-molinillo ruby-msgpack
  ruby-multi-json ruby-net-http-persistent ruby-nio4r ruby-nokogiri ruby-oj
  ruby-pkg-config ruby-public-suffix ruby-rack ruby-rack-test ruby-rails
  ruby-rails-deprecated-sanitizer ruby-rails-dom-testing
  ruby-rails-html-sanitizer ruby-railties ruby-rb-inotify ruby-regexp-parser
  ruby-sass ruby-sass-rails ruby-sdoc ruby-selenium-webdriver ruby-spring
  ruby-spring-watcher-listen ruby-sprockets ruby-sprockets-rails ruby-sqlite3
  ruby-thor ruby-thread-safe ruby-tilt ruby-turbolinks ruby-turbolinks-source
  ruby-tzinfo ruby-uglifier ruby-web-console ruby-websocket-driver
  ruby-websocket-extensions ruby-xpath ruby-zip sqlite3
Suggested packages:
  coffeescript libjs-jquery-ui-docs npm ruby-launchy ruby-sass-listen
  firefoxdriver sqlite3-doc
The following NEW packages will be installed:
  chromium-browser chromium-chromedriver libc-ares2 libjs-coffeescript
  libjs-jquery-ui libjs-source-map libjs-uglify libnode64 node-turbolinks
  nodejs nodejs-doc puma rails ruby-actioncable ruby-actionmailer
  ruby-actionpack ruby-actionview ruby-activejob ruby-activemodel
  ruby-activerecord ruby-activestorage ruby-activesupport ruby-addressable
  ruby-archive-zip ruby-arel ruby-atomic ruby-bindex ruby-bootsnap
  ruby-builder ruby-bundler ruby-byebug ruby-capybara ruby-childprocess
  ruby-chromedriver-helper ruby-coffee-rails ruby-coffee-script
  ruby-coffee-script-source ruby-columnize ruby-concurrent ruby-crass
  ruby-erubi ruby-execjs ruby-ffi ruby-globalid ruby-hike ruby-i18n
  ruby-io-like ruby-jbuilder ruby-jquery-rails ruby-listen ruby-loofah
  ruby-mail ruby-marcel ruby-method-source ruby-mimemagic ruby-mini-mime
  ruby-molinillo ruby-msgpack ruby-multi-json ruby-net-http-persistent
  ruby-nio4r ruby-nokogiri ruby-oj ruby-pkg-config ruby-public-suffix
  ruby-rack ruby-rack-test ruby-rails ruby-rails-deprecated-sanitizer
  ruby-rails-dom-testing ruby-rails-html-sanitizer ruby-railties
  ruby-rb-inotify ruby-regexp-parser ruby-sass ruby-sass-rails ruby-sdoc
  ruby-selenium-webdriver ruby-spring ruby-spring-watcher-listen
  ruby-sprockets ruby-sprockets-rails ruby-sqlite3 ruby-thor ruby-thread-safe
  ruby-tilt ruby-turbolinks ruby-turbolinks-source ruby-tzinfo ruby-uglifier
  ruby-web-console ruby-websocket-driver ruby-websocket-extensions ruby-xpath
  ruby-zip sqlite3
0 upgraded, 96 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.2 MB of archives.
After this operation, 64.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

それぞれのバージョンを確認します。


$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
$ gem -v
3.1.2
$ rails -v
Rails 5.2.3

Re:VIEW インストール


$ gem install review
Fetching tty-color-0.6.0.gem
Fetching rouge-3.26.1.gem
Fetching tty-logger-0.6.0.gem
Fetching pastel-0.8.0.gem
Fetching review-5.3.0.gem
Fetching image_size-3.0.1.gem
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /var/lib/gems/2.7.0 directory.

おっ。今回は、Apache 上で使うためにシステムにインストールすることにします。




$ sudo gem install review
Fetching tty-logger-0.6.0.gem
Fetching rouge-3.26.1.gem
Fetching review-5.3.0.gem
Fetching pastel-0.8.0.gem
Fetching tty-color-0.6.0.gem
Fetching image_size-3.0.1.gem
Successfully installed image_size-3.0.1
Successfully installed rouge-3.26.1
Successfully installed tty-color-0.6.0
Successfully installed pastel-0.8.0
Successfully installed tty-logger-0.6.0
Successfully installed review-5.3.0
Parsing documentation for image_size-3.0.1
Installing ri documentation for image_size-3.0.1
Parsing documentation for rouge-3.26.1
Installing ri documentation for rouge-3.26.1
Parsing documentation for tty-color-0.6.0
Installing ri documentation for tty-color-0.6.0
Parsing documentation for pastel-0.8.0
Installing ri documentation for pastel-0.8.0
Parsing documentation for tty-logger-0.6.0
Installing ri documentation for tty-logger-0.6.0
Parsing documentation for review-5.3.0
Installing ri documentation for review-5.3.0
Done installing documentation for image_size, rouge, tty-color, pastel, tty-logger, review after 11 seconds
6 gems installed


$ sudo gem instal md2review
Fetching md2review-1.12.1.gem
Fetching redcarpet-3.5.1.gem
Building native extensions. This could take a while...
ERROR:  Error installing md2review:
	ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.7.0/gems/redcarpet-3.5.1/ext/redcarpet
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20211213-17433-198317t.rb extconf.rb
creating Makefile

current directory: /var/lib/gems/2.7.0/gems/redcarpet-3.5.1/ext/redcarpet
make "DESTDIR=" clean
sh: 1: make: not found

current directory: /var/lib/gems/2.7.0/gems/redcarpet-3.5.1/ext/redcarpet
make "DESTDIR="
sh: 1: make: not found

make failed, exit code 127

Gem files will remain installed in /var/lib/gems/2.7.0/gems/redcarpet-3.5.1 for inspection.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/redcarpet-3.5.1/gem_make.out

おっと、何も設定していない Ubuntu なので make が入っていませんでした。まとめて build-essential でインストールします。


$ sudo apt install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-9 dpkg-dev fakeroot g++ g++-9 gcc gcc-9 gcc-9-base
  libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1 libbinutils libc-dev-bin
  libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-9-dev libgomp1
  libisl22 libitm1 liblsan0 libmpc3 libquadmath0 libstdc++-9-dev libtsan0 libubsan1 linux-libc-dev make manpages-dev
Suggested packages:
  binutils-doc cpp-doc gcc-9-locales debian-keyring g++-multilib g++-9-multilib gcc-9-doc gcc-multilib autoconf automake
  libtool flex bison gdb gcc-doc gcc-9-multilib glibc-doc bzr libstdc++-9-doc make-doc
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu build-essential cpp cpp-9 dpkg-dev fakeroot g++ g++-9 gcc gcc-9
  gcc-9-base libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan5 libatomic1 libbinutils
  libc-dev-bin libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0 libdpkg-perl libfakeroot libfile-fcntllock-perl
  libgcc-9-dev libgomp1 libisl22 libitm1 liblsan0 libmpc3 libquadmath0 libstdc++-9-dev libtsan0 libubsan1 linux-libc-dev make
  manpages-dev
0 upgraded, 41 newly installed, 0 to remove and 0 not upgraded.
Need to get 43.0 MB of archives.
After this operation, 189 MB of add

改めて。


$ sudo gem instal md2review
Building native extensions. This could take a while...
Successfully installed redcarpet-3.5.1
Successfully installed md2review-1.12.1
Parsing documentation for redcarpet-3.5.1
Installing ri documentation for redcarpet-3.5.1
Parsing documentation for md2review-1.12.1
Installing ri documentation for md2review-1.12.1
Done installing documentation for redcarpet, md2review after 0 seconds
2 gems installed

インストールできたかな? 試してみます


$ review-init testwrite
$ cd testwrite
$ rake pdf

以下のようにエラーが出ました。


$ rake pdf
review-pdfmaker  config.yml
ℹ INFO    compiling testwrite.tex  
⚠ WARN testwrite.re:1: headline is empty.
⚠ WARN testwrite.re:1: headline is empty.
ℹ INFO    uplatex -interaction=nonstopmode -file-line-error -halt-on-error __REVIEW_BOOK__.tex
Traceback (most recent call last):
	15: from /usr/local/bin/review-pdfmaker:23:in `<main>'
	14: from /usr/local/bin/review-pdfmaker:23:in `load'
	13: from /var/lib/gems/2.7.0/gems/review-5.3.0/bin/review-pdfmaker:14:in `<top (required)>'
	12: from /var/lib/gems/2.7.0/gems/review-5.3.0/lib/review/pdfmaker.rb:93:in `execute'
	11: from /var/lib/gems/2.7.0/gems/review-5.3.0/lib/review/pdfmaker.rb:147:in `execute'
	10: from /var/lib/gems/2.7.0/gems/review-5.3.0/lib/review/pdfmaker.rb:287:in `generate_pdf'
	 9: from /var/lib/gems/2.7.0/gems/review-5.3.0/lib/review/pdfmaker.rb:195:in `build_pdf'
	 8: from /var/lib/gems/2.7.0/gems/review-5.3.0/lib/review/pdfmaker.rb:195:in `chdir'
	 7: from /var/lib/gems/2.7.0/gems/review-5.3.0/lib/review/pdfmaker.rb:237:in `block in build_pdf'
	 6: from /var/lib/gems/2.7.0/gems/review-5.3.0/lib/review/pdfmaker.rb:237:in `times'
	 5: from /var/lib/gems/2.7.0/gems/review-5.3.0/lib/review/pdfmaker.rb:238:in `block (2 levels) in build_pdf'
	 4: from /var/lib/gems/2.7.0/gems/review-5.3.0/lib/review/pdfmaker.rb:55:in `system_or_raise'
	 3: from /usr/lib/ruby/2.7.0/open3.rb:390:in `capture2e'
	 2: from /usr/lib/ruby/2.7.0/open3.rb:208:in `popen2e'
	 1: from /usr/lib/ruby/2.7.0/open3.rb:213:in `popen_run'
/usr/lib/ruby/2.7.0/open3.rb:213:in `spawn': No such file or directory - uplatex (Errno::ENOENT)
rake aborted!
Command failed with status (1): [review-pdfmaker  config.yml...]
lib/tasks/review.rake:112:in `block in <top (required)>'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => pdf => book.pdf
(See full trace by running task with --trace)

Re:VIEW 2.0 と同様、uplatex を使うらしいですね。Ubuntu 20.04 の uplatex はどのパッケージかな?

$ apt-cache search uplatex
texlive-lang-japanese - TeX Live: Japanese
texlive-latex-extra - TeX Live: LaTeX additional packages

ということなので、以下のようにインストールします。

$ sudo apt-get install texlive-lang-japanese
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dvisvgm emacsen-common fontconfig-config fonts-arphic-bkai00mp fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp
  fonts-arphic-gkai00mp fonts-baekmuk fonts-dejavu-core fonts-droid-fallback fonts-ipaexfont-gothic fonts-ipaexfont-mincho
  fonts-ipafont-gothic fonts-ipafont-mincho fonts-lmodern fonts-noto-mono fonts-sil-padauk fonts-tlwg-garuda
  fonts-tlwg-garuda-otf fonts-tlwg-kinnari fonts-tlwg-kinnari-otf fonts-tlwg-laksaman fonts-tlwg-laksaman-otf fonts-tlwg-loma
  fonts-tlwg-loma-otf fonts-tlwg-mono fonts-tlwg-mono-otf fonts-tlwg-norasi fonts-tlwg-norasi-otf fonts-tlwg-purisa
  fonts-tlwg-purisa-otf fonts-tlwg-sawasdee fonts-tlwg-sawasdee-otf fonts-tlwg-typewriter fonts-tlwg-typewriter-otf
  fonts-tlwg-typist fonts-tlwg-typist-otf fonts-tlwg-typo fonts-tlwg-typo-otf fonts-tlwg-umpush fonts-tlwg-umpush-otf
  fonts-tlwg-waree fonts-tlwg-waree-otf fonts-unfonts-core fonts-unfonts-extra fonts-urw-base35 ghostscript latex-cjk-all
  latex-cjk-chinese latex-cjk-chinese-arphic-bkai00mp latex-cjk-chinese-arphic-bsmi00lp latex-cjk-chinese-arphic-gbsn00lp
  latex-cjk-chinese-arphic-gkai00mp latex-cjk-common latex-cjk-japanese latex-cjk-japanese-wadalab latex-cjk-korean
  latex-cjk-thai libauthen-sasl-perl libavahi-client3 libavahi-common-data libavahi-common3 libcairo2 libcups2
  libdata-dump-perl libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libencode-locale-perl libfile-basedir-perl
  libfile-desktopentry-perl libfile-listing-perl libfile-mimeinfo-perl libfont-afm-perl libfontconfig1 libfontenc1 libgl1
  libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgraphite2-3 libgs9 libgs9-common libharfbuzz-icu0
  libharfbuzz0b libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl
  libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libice6 libidn11
  libijs-0.35 libio-html-perl libio-socket-ssl-perl libio-stringy-perl libipc-system-simple-perl libjbig0 libjbig2dec0
  libjpeg-turbo8 libjpeg8 libkpathsea6 liblcms2-2 libllvm12 liblwp-mediatypes-perl liblwp-protocol-https-perl
  libmailtools-perl libnet-dbus-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libopenjp2-7 libpaper-utils
  libpaper1 libpciaccess0 libpixman-1-0 libptexenc1 libsensors-config libsensors5 libsm6 libsynctex2 libteckit0 libtexlua53
  libtexluajit2 libtie-ixhash-perl libtiff5 libtimedate-perl libtry-tiny-perl liburi-perl libvulkan1 libwayland-client0
  libwebp6 libwoff1 libwww-perl libwww-robotrules-perl libx11-protocol-perl libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0
  libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0
  libxcomposite1 libxcursor1 libxfixes3 libxft2 libxi6 libxinerama1 libxkbfile1 libxml-parser-perl libxml-twig-perl
  libxml-xpathengine-perl libxmu6 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxt6 libxtst6 libxv1 libxxf86dga1
  libxxf86vm1 libzzip-0-13 lmodern mesa-vulkan-drivers perl-openssl-defaults poppler-data ps2eps t1utils tex-common
  texlive-base texlive-binaries texlive-font-utils texlive-lang-chinese texlive-lang-cjk texlive-lang-korean
  texlive-lang-other texlive-latex-base x11-common x11-utils x11-xserver-utils xdg-utils xfonts-encodings xfonts-utils
Suggested packages:
  fonts-noto fonts-freefont-otf | fonts-freefont-ttf fonts-texgyre ghostscript-x hbf-cns40-b5 hbf-jfs56 hbf-kanji48
  libdigest-hmac-perl libgssapi-perl cups-common liblcms2-utils libcrypt-ssleay-perl lm-sensors libauthen-ntlm-perl
  libunicode-map8-perl libunicode-string-perl xml-twig-tools poppler-utils fonts-arphic-ukai fonts-arphic-uming fonts-nanum
  debhelper perl-tk xpdf | pdf-viewer xzdec lcdf-typetools psutils texlive-latex-base-doc mesa-utils nickle cairo-5c
  xorg-docs-core
The following NEW packages will be installed:
  dvisvgm emacsen-common fontconfig-config fonts-arphic-bkai00mp fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp
  fonts-arphic-gkai00mp fonts-baekmuk fonts-dejavu-core fonts-droid-fallback fonts-ipaexfont-gothic fonts-ipaexfont-mincho
  fonts-ipafont-gothic fonts-ipafont-mincho fonts-lmodern fonts-noto-mono fonts-sil-padauk fonts-tlwg-garuda
  fonts-tlwg-garuda-otf fonts-tlwg-kinnari fonts-tlwg-kinnari-otf fonts-tlwg-laksaman fonts-tlwg-laksaman-otf fonts-tlwg-loma
  fonts-tlwg-loma-otf fonts-tlwg-mono fonts-tlwg-mono-otf fonts-tlwg-norasi fonts-tlwg-norasi-otf fonts-tlwg-purisa
  fonts-tlwg-purisa-otf fonts-tlwg-sawasdee fonts-tlwg-sawasdee-otf fonts-tlwg-typewriter fonts-tlwg-typewriter-otf
  fonts-tlwg-typist fonts-tlwg-typist-otf fonts-tlwg-typo fonts-tlwg-typo-otf fonts-tlwg-umpush fonts-tlwg-umpush-otf
  fonts-tlwg-waree fonts-tlwg-waree-otf fonts-unfonts-core fonts-unfonts-extra fonts-urw-base35 ghostscript latex-cjk-all
  latex-cjk-chinese latex-cjk-chinese-arphic-bkai00mp latex-cjk-chinese-arphic-bsmi00lp latex-cjk-chinese-arphic-gbsn00lp
  latex-cjk-chinese-arphic-gkai00mp latex-cjk-common latex-cjk-japanese latex-cjk-japanese-wadalab latex-cjk-korean
  latex-cjk-thai libauthen-sasl-perl libavahi-client3 libavahi-common-data libavahi-common3 libcairo2 libcups2
  libdata-dump-perl libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libencode-locale-perl libfile-basedir-perl
  libfile-desktopentry-perl libfile-listing-perl libfile-mimeinfo-perl libfont-afm-perl libfontconfig1 libfontenc1 libgl1
  libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgraphite2-3 libgs9 libgs9-common libharfbuzz-icu0
  libharfbuzz0b libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl
  libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libice6 libidn11
  libijs-0.35 libio-html-perl libio-socket-ssl-perl libio-stringy-perl libipc-system-simple-perl libjbig0 libjbig2dec0
  libjpeg-turbo8 libjpeg8 libkpathsea6 liblcms2-2 libllvm12 liblwp-mediatypes-perl liblwp-protocol-https-perl
  libmailtools-perl libnet-dbus-perl libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libopenjp2-7 libpaper-utils
  libpaper1 libpciaccess0 libpixman-1-0 libptexenc1 libsensors-config libsensors5 libsm6 libsynctex2 libteckit0 libtexlua53
  libtexluajit2 libtie-ixhash-perl libtiff5 libtimedate-perl libtry-tiny-perl liburi-perl libvulkan1 libwayland-client0
  libwebp6 libwoff1 libwww-perl libwww-robotrules-perl libx11-protocol-perl libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0
  libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0
  libxcomposite1 libxcursor1 libxfixes3 libxft2 libxi6 libxinerama1 libxkbfile1 libxml-parser-perl libxml-twig-perl
  libxml-xpathengine-perl libxmu6 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxt6 libxtst6 libxv1 libxxf86dga1
  libxxf86vm1 libzzip-0-13 lmodern mesa-vulkan-drivers perl-openssl-defaults poppler-data ps2eps t1utils tex-common
  texlive-base texlive-binaries texlive-font-utils texlive-lang-chinese texlive-lang-cjk texlive-lang-japanese
  texlive-lang-korean texlive-lang-other texlive-latex-base x11-common x11-utils x11-xserver-utils xdg-utils xfonts-encodings
  xfonts-utils
0 upgraded, 199 newly installed, 0 to remove and 0 not upgraded.
Need to get 414 MB of archives.
After this operation, 1585 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

フォントもインストールしておきます。


$ sudo apt-get install texlive-fonts-recommended
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  fonts-texgyre tex-gyre tipa
Suggested packages:
  texlive-fonts-recommended-doc
The following NEW packages will be installed:
  fonts-texgyre tex-gyre texlive-fonts-recommended tipa
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 24.4 MB of archives.
After this operation, 62.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

さて、どうかな?


$ rake pdf
review-pdfmaker  config.yml
ℹ INFO    compiling testwrite.tex  
⚠ WARN testwrite.re:1: headline is empty.
⚠ WARN testwrite.re:1: headline is empty.
ℹ INFO    uplatex -interaction=nonstopmode -file-line-error -halt-on-error __REVIEW_BOOK__.tex
⨯ ERROR   failed to run command: uplatex -interaction=nonstopmode -file-line-error -halt-on-error __REVIEW_BOOK__.tex

Error log:
This is e-upTeX, Version 3.14159265-p3.8.2-u1.25-190908-2.6 (utf8.uptex) (TeX Live 2019/Debian) (preloaded format=uplatex)
 restricted \write18 enabled.
entering extended mode
(./__REVIEW_BOOK__.tex
pLaTeX2e <2020-02-02u03>+2 (based on LaTeX2e <2020-02-02> patch level 2)
L3 programming layer <2020-02-14> (./review-jsbook.cls
(/usr/share/texlive/texmf-dist/tex/latex/plautopatch/plautopatch.sty

! LaTeX Error: File `filehook.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
/usr/share/texlive/texmf-dist/tex/latex/plautopatch/plautopatch.sty:27: Emergen
cy stop.
<read *> 
         
l.27 ^^M
        
No pages of output.
Transcript written on __REVIEW_BOOK__.log.
rake aborted!
Command failed with status (1): [review-pdfmaker  config.yml...]
lib/tasks/review.rake:112:in `block in <top (required)>'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => pdf => book.pdf
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [review-pdfmaker  config.yml...]
lib/tasks/review.rake:112:in `block in <top (required)>'
/usr/share/rubygems-integration/all/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => pdf => book.pdf
(See full trace by running task with --trace)

このエラーは、texlive-latex-extra パッケージをインストールするとクリアするらしいです。
cf.,「Linux/Linux Mint - TeX Wiki」https://texwiki.texjp.org/?Linux%2FLinux%20Mint#texlive


$ sudo apt install texlive-latex-extra
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libapache-pom-java libcommons-logging-java libcommons-parent-java libfontbox-java libpdfbox-java libtcl8.6 libtk8.6 libxss1
  preview-latex-style tcl tcl8.6 texlive-latex-recommended texlive-pictures texlive-plain-generic tk tk8.6 xbitmaps xterm
Suggested packages:
  libavalon-framework-java libcommons-logging-java-doc libexcalibur-logkit-java liblog4j1.2-java tcl-tclreadline
  python3-pygments icc-profiles libfile-which-perl libspreadsheet-parseexcel-perl texlive-latex-extra-doc
  texlive-latex-recommended-doc texlive-luatex texlive-pstricks dot2tex prerex ruby-tcltk | libtcltk-ruby
  texlive-pictures-doc vprerex default-jre-headless xfonts-cyrillic
The following NEW packages will be installed:
  libapache-pom-java libcommons-logging-java libcommons-parent-java libfontbox-java libpdfbox-java libtcl8.6 libtk8.6 libxss1
  preview-latex-style tcl tcl8.6 texlive-latex-extra texlive-latex-recommended texlive-pictures texlive-plain-generic tk
  tk8.6 xbitmaps xterm
0 upgraded, 19 newly installed, 0 to remove and 0 not upgraded.
Need to get 65.4 MB of archives.
After this operation, 192 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

これで、

rake pdf

とすると、

book.pdfができました。
image.png

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?