Linux下安装calibre-ebook

官网地址:https://calibre-ebook.com/download

  • 需要有python环境 ➡️ Linux安装python2.7.9
  • 需要支持GLIBC_2.17和libstdc++.so ➡️ Linux下安装GLIBC_2.18和libstdc++.so

官网的说法:- You need GLIBC 2.17 or higher and libstdc++.so.6.0.17 (from gcc 4.7.0) or higher to run calibre

1、Linux下安装(其他系统请自行前往官网安装)

--- 安装依赖包
# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make xdg-utils wget qt4 qt4-devel qt4-x11 libpcap-devel xz-devel -y
# cd /usr/bin
# ln -s qmake-qt4 qmake
# qmake -v
# cd /opt
# sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin

2、如果安装失败需要执行卸载操作

//卸载calibre
# sudo rm -rf /opt/calibre/*
//清除失效的软连接
# cd /usr/bin/
rm -rf ./calibre*
rm -rf ./ebook*
rm -rf fetch-ebook-metadata
rm -rf lrf2lrs
rm -rf lrfviewer
rm -rf lrs2lrf
rm -rf markdown-calibre
rm -rf web2disk

3、安装sip(如果使用过程中有报错再安装)

# wget https://excellmedia.dl.sourceforge.net/project/pyqt/sip/sip-4.16.8/sip-4.16.8.tar.gz
# tar -xzvf sip-4.16.8.tar.gz
# cd sip-4.16.8
# python configure.py
# make
# sudo make install
# ln -s /usr/local/Python2.7.9/bin/sip /usr/bin/sip
--- 终端查看sip版本
# sip -V

4、PyQt5编译安装(如果使用过程中有报错再安装)

# wget https://excellmedia.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-5.2.1/PyQt-gpl-5.2.1.tar.gz
# tar -xzvf PyQt-gpl-5.2.1.tar.gz
# cd PyQt-gpl-5.2.1
# python configure.py --sip-incdir=/usr/local/Python2.9
# make -j4
# sudo make install

你可能感兴趣的:(Linux下安装calibre-ebook)