📢 Webサイト閉鎖と移転のお知らせ
このWebサイトは2026年9月に閉鎖いたします。
新しい記事は移転先で追加しております。(旧サイトでは記事を追加しておりません)

 
(同じ利用者による、間の3版が非表示)
49行目: 49行目:
https://download.calibre-ebook.com<br>
https://download.calibre-ebook.com<br>
<br>
<br>
Calibreをインストールするため、以下のコマンドを実行する。<br>
Calibreをインストールする。<br>
以下の例では、/opt/calibreにCalibreをインストールしている。<br>
mkdir -p <任意のインストールディレクトリ>
  sudo mkdir -p /opt/calibre
   
  sudo tar xf calibre-tarball.txz -C /opt/calibre
  tar xf calibre-tarball.txz -C <任意のインストールディレクトリ>
  sudo /opt/calibre/calibre_postinstall
  /<任意のインストールディレクトリ>/calibre_postinstall
<br><br>
<br><br>


68行目: 69行目:
Calibreのビルドに必要なライブラリをインストールする。<br>
Calibreのビルドに必要なライブラリをインストールする。<br>
  # SUSE
  # SUSE
  sudo zypper install make cmake autoconf automake libtool nasm ncurses-devel ninja nodejs-common nodejs-default \
  sudo zypper install make cmake autoconf automake libtool nasm ncurses-devel ninja nodejs-common nodejs-default                 \
                     zlib-devel libbz2-devel xz-devel libunrar-devel libzstd-devel libbrotli-devel libexpat-devel readline-devel \
                     zlib-devel libbz2-devel xz-devel libunrar-devel libzstd-devel libbrotli-devel libexpat-devel readline-devel \
                     glib2-devel dbus-1-devel dbus-1-glib-devel libicu-devel sqlite3-devel libffi-devel hyphen-devel snowball-devel \
                     glib2-devel dbus-1-devel dbus-1-glib-devel libicu-devel sqlite3-devel libffi-devel hyphen-devel snowball-devel \
                     freetype2-devel fontconfig-devel libjpeg62-devel libjpeg-turbo libjbig-devel jxrlib-devel openjpeg-devel openjpeg2-devel \
                     freetype2-devel fontconfig-devel libjpeg62-devel libjpeg-turbo libjbig-devel jxrlib-devel                   \
                    libpng16-devel optipng libtiff-devel libwebp-devel \
                    openjpeg-devel openjpeg2-devel libpng16-devel optipng libtiff-devel libwebp-devel                           \
                     libxml2-devel libxslt-devel libgcrypt-devel libgpg-error-devel libpoppler-devel libpodofo-devel chmlib-devel \
                     libxml2-devel libxslt-devel libgcrypt-devel libgpg-error-devel libpoppler-devel libpodofo-devel chmlib-devel \
                     xxhash-devel libuchardet-devel msgpack-c-devel msgpack-cxx-devel libspeechd-devel hunspell-devel \
                     xxhash-devel libuchardet-devel msgpack-c-devel msgpack-cxx-devel libspeechd-devel hunspell-devel             \
                     graphite2-devel libusb-1_0-devel libmtp-devel libopenssl-devel libopenssl-1_1-devel \
                     graphite2-devel libusb-1_0-devel libmtp-devel libopenssl-devel libopenssl-1_1-devel                         \
                     qt6-base-devel qt6-declarative-devel qt6-svg-devel qt6-imageformats-devel qt6-shadertools-devel qt6-wayland-devel \
                     qt6-base-devel qt6-declarative-devel qt6-svg-devel qt6-imageformats-devel qt6-shadertools-devel qt6-wayland-devel \
                     qt6-webenginecore-devel qt6-webenginewidgets-devel qt6-webchannel-devel qt6-sensors-devel qt6-positioning-devel \
                     qt6-webenginecore-devel qt6-webenginewidgets-devel qt6-webchannel-devel qt6-sensors-devel qt6-positioning-devel   \
                     python311-devel python311-installer python311-packaging python311-wheel python311-pyproject-hooks python311-build \
                     python311-devel python311-installer python311-packaging python311-wheel python311-pyproject-hooks python311-build \
                     python311-setuptools python3-setuptools_scm python311-six python311-lxml python311-html5lib python3-html5-parser \
                     python311-setuptools python3-setuptools_scm python311-six python311-lxml python311-html5lib python3-html5-parser \
                     python311-python-dateutil python311-jeepney python311-dnspython \
                     python311-python-dateutil python311-jeepney python311-dnspython                                           \
                     python311-soupsieve python311-beautifulsoup4 python311-regex python311-chardet python311-u-msgpack-python \
                     python311-soupsieve python311-beautifulsoup4 python311-regex python311-chardet python311-u-msgpack-python \
                     python311-Pygments python311-webencodings python311-Pillow python311-netifaces python311-psutil \
                     python311-Pygments python311-webencodings python311-Pillow python311-netifaces python311-psutil           \
                     python311-Brotli python311-zstd python311-ply python311-poetry-core python3-css-parser python3-pychm python3-mechanize python3-sgmllib3k python3-feedparser python3-html2text \
                     python311-Brotli python311-zstd python311-ply python311-poetry-core python3-css-parser python3-pychm     \
                     python3-Markdown python3-pycryptodome python3-apsw python3-ifaddr python3-texttable python3-zeroconf python3-FontTools \
                    python3-mechanize python3-sgmllib3k python3-feedparser python3-html2text                                 \
                    python3-PyQt6 python3-sip6-devel python3-PyQt6-sip python3-pyqt-builder python3-PyQt6-WebEngine-devel
                     python3-Markdown python3-pycryptodome python3-apsw python3-ifaddr python3-texttable python3-zeroconf     \
                    python3-FontTools python3-PyQt6 python3-sip6-devel python3-PyQt6-sip python3-pyqt-builder                 \
                    python3-PyQt6-WebEngine-devel
<br>
<br>
依存関係のインストール完了後、Calibreをインストールするため、以下のコマンドを実行する。<br>
依存関係のインストール完了後、Calibreをインストールするため、以下のコマンドを実行する。<br>
  curl -L https://calibre-ebook.com/dist/src | tar Jxv cd calibre*
  curl -L https://calibre-ebook.com/dist/src | tar Jxv cd calibre*
  sudo python setup.py install
  sudo python setup.py install
<br><br>
== エラー関連 ==
==== FreeTypeライブラリに関するエラー ====
ebook-editorおよびebook-viewerの実行時において、以下に示すエラーが表示される場合がある。<br>
Failed to import PyQt module: PyQt6.QtWebEngineCore with error: /path/to/Calibre/lib/libQt6WebEngineCore.so.6: undefined symbol: FT_Get_Color_Glyph_Paint
Traceback (most recent call last):
  File "runpy.py", line 198, in _run_module_as_main
  File "runpy.py", line 88, in _run_code
  File "site.py", line 47, in <module>
  File "site.py", line 43, in main
  File "calibre/gui_launch.py", line 105, in wrapper
  File "calibre/gui_launch.py", line 120, in ebook_viewer
  File "bypy-importer.py", line 279, in exec_module
  File "calibre/gui2/viewer/main.py", line 16, in <module>
  File "bypy-importer.py", line 279, in exec_module
  File "calibre/gui2/viewer/ui.py", line 43, in <module>
  File "bypy-importer.py", line 279, in exec_module
  File "calibre/gui2/viewer/annotations.py", line 14, in <module>
  File "bypy-importer.py", line 279, in exec_module
  File "calibre/gui2/viewer/web_view.py", line 29, in <module>
ImportError: cannot import name 'QWebEnginePage' from 'qt.webengine' (/path/to/Calibre/lib/calibre-extensions/python-lib.bypy.frozen/qt/webengine.pyc)
<br>
<u>FT_Get_Color_Glyph_Paint</u> とは FreeType 2.11以降で追加された関数である。<br>
システムにインストールされているFreeTypeライブラリのバージョンが古いため、このエラーが発生する。<br>
<br>
まず、現在インストールされているFreeTypeライブラリのバージョンを確認する。<br>
freetype-config --version 2>/dev/null || pkg-config --modversion freetype2
<br>
バージョンが古い場合は、FreeType 2.11以降を手動でインストールする。<br>
# まず、FreeTypeのビルドに必要な依存関係のライブラリをインストールする。
#: <syntaxhighlight lang="text">
# RHEL
sudo dnf install make cmake tar gcc bzip2-devel zlib-devel harfbuzz-devel libpng-devel brotli-devel
# SUSE
sudo zypper install make cmake tar gcc libbz2-devel zlib-devel harfbuzz-devel libpng16-devel libbrotli-devel
</syntaxhighlight>
#: <br>
# FreeType 2.11以降のソースコードをダウンロードする。
#: https://fosszone.csd.auth.gr/nongnu/freetype/
# ダウンロードしたファイルを解凍する。
#: <syntaxhighlight lang="text">
tar xf freetype-<バージョン>.tar.xz
cd freetype-<バージョン>
</syntaxhighlight>
#: <br>
# FreeTypeをビルドおよびインストールする。
#: <syntaxhighlight lang="text">
cmake ..
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX=<Calibreのインストールディレクトリ>
      -DBUILD_SHARED_LIBS=On
make -j $(nproc)
make install
</syntaxhighlight>
#: <br>
# 環境変数 <code>LD_LIBRARY_PATH</code> を設定して、ebook-editorおよびebook-viewerを起動する。
#: <syntaxhighlight lang="text">
export LD_LIBRARY_PATH="/path/to/Calibre/lib64:$LD_LIBRARY_PATH"
./ebook-viewer
</syntaxhighlight>
<br><br>
<br><br>