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

 
(同じ利用者による、間の2版が非表示)
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>


92行目: 93行目:
  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>