Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calibre安装完了之后运行,提示如下,请问遇到过吗 #1

Open
devilmengcry opened this issue Jan 27, 2018 · 15 comments
Open

Comments

@devilmengcry
Copy link

 File "site.py", line 77, in main
  File "site-packages/calibre/gui_launch.py", line 73, in calibre
  File "site-packages/calibre/gui2/__init__.py", line 7, in <module>
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
@TruthHun
Copy link
Owner

你的是什么操作系统?安装的calibre是什么版本?你是按照官网的教程安装的吗?
执行以下:

ebook-convert --version

能看到版本号码

@devilmengcry
Copy link
Author

我用的是centos7
官网就只有一条安装命令
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
安装的时候最后报出

____________________ WARNING ____________________
Setting up completion failed with error:
__________________________________________________


	Traceback (most recent call last):
	  File "site-packages/calibre/linux.py", line 753, in setup_completion
	  File "site-packages/calibre/linux.py", line 508, in write_completion
	  File "site-packages/calibre/gui2/__init__.py", line 7, in <module>
	ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Setting up desktop integration...
Run "calibre" to start calibre

运行calibre提示

Traceback (most recent call last):
  File "site.py", line 77, in main
  File "site-packages/calibre/gui_launch.py", line 73, in calibre
  File "site-packages/calibre/gui2/__init__.py", line 7, in <module>
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

ebook-convert --version

ebook-convert (calibre 3.16.0)
Created by: Kovid Goyal <kovid@kovidgoyal.net>

@TruthHun
Copy link
Owner

TruthHun commented Jan 28, 2018

执行

ebook-convert --version

能看到版本号,说明已安装成功了。你那个错误只是WARNING级别。你试着创建个text文本,比如example.txt,里面随便写些内容,然后执行

ebook-convert example.txt example.pdf

把文本内容转成PDF,如果转成功,那基本没问题。

@TruthHun
Copy link
Owner

网上帮查了下,缺少libgl.so库,你看下centos怎么安装这个库。

@devilmengcry
Copy link
Author

devilmengcry commented Jan 28, 2018

安装了
yum -y install qt5-qtbase-gui qt5-qtdeclarative之后
ebook-convert /tmp/sessionId/content.epub /tmp/sessionId/output/book.mobi成功
ebook-convert /tmp/sessionId/content.epub /tmp/sessionId/output/book.docx成功
ebook-convert /tmp/sessionId/content.epub /tmp/sessionId/output/book.epub成功
ebook-convert /tmp/sessionId/content.epub /tmp/sessionId/output/book.pdf失败

错误如下:

Creating PDF Output...
67% Running PDF Output plugin
Splitting markup on page breaks and flow limits, if any...
Traceback (most recent call last):
  File "site.py", line 77, in main
  File "site-packages/calibre/ebooks/conversion/cli.py", line 391, in main
  File "site-packages/calibre/ebooks/conversion/plumber.py", line 1252, in run
  File "site-packages/calibre/ebooks/conversion/plugins/pdf_output.py", line 177, in convert
  File "site-packages/calibre/ebooks/conversion/plugins/pdf_output.py", line 240, in convert_text
  File "site-packages/calibre/ebooks/pdf/render/from_html.py", line 17, in <module>
ImportError: libXcomposite.so.1: cannot open shared object file: No such file or directory

@TruthHun
Copy link
Owner

先试着转化下文档,刚刚说的创建个example.txt文档进行转化测试。看下转化效果,转化成功了那基本没问题了。

ebook-convert example.txt example.pdf

@TruthHun
Copy link
Owner

缺什么库就安装什么库吧,我的calibre的环境是Ubuntu,就一行命令全搞定了。centos我没试过,我这边使用的是Ubuntu系统。

@yemengge
Copy link

yemengge commented Mar 6, 2018

请问问题解决了吗?我centos7也遇到这个问题了。

@devilmengcry
Copy link
Author

@yemengge 没有找到原因,我这有很多centos7,几台成功几台失败。

@yemengge
Copy link

yemengge commented Mar 6, 2018

好吧,谢啦

@yemengge
Copy link

yemengge commented Mar 6, 2018

请问还需要安装Qt吗?

报错信息换了。

[root@MiWiFi-R3-srv tmp]# ebook-convert 111.txt qqq.pdf
1% Converting input to HTML...
InputFormatPlugin: TXT Input running
on /tmp/111.txt
Language not specified
Creator not specified
Building file list...
Normalizing filename cases
Rewriting HTML links
flow is too short, not running heuristics
Forcing index.html into XHTML namespace
34% Running transforms on e-book...
Merging user specified metadata...
Detecting structure...
Auto generated TOC with 0 entries.
Flattening CSS and remapping font sizes...
Source base font size is 12.00000pt
Removing fake margins...
Cleaning up manifest...
Trimming unused files from manifest...
Creating PDF Output...
67% Running PDF Output plugin
Splitting markup on page breaks and flow limits, if any...
This application failed to start because it could not find or load the Qt platform plugin "headless"
in "/opt/calibre/lib/python2.7/site-packages/calibre/plugins".

Available platform plugins are: headless (from /opt/calibre/lib/python2.7/site-packages/calibre/plugins), linuxfb, minimal, offscreen, xcb.

Reinstalling the application may fix this problem.
Aborted

@bitprince
Copy link

1、在阿里云CentOS7.4安装calibre碰到了之前在其它版本未遇到的很多问题,安装了如下依赖包,使得ebook-convert可以生成各种文件:
yum -y install mesa-libGL.x86_64
yum -y install ImageMagick
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel gcc gcc-c++ openssl-devel
yum install Xcb
yum -y install qt5*

2、虽然生成文件了,但中文都没了,是因为Linux系统少了中文字体
将Windows系统的C:\Windows\Fonts目录中的中文字体(比如输入微软雅黑)上传到Linux,可在
/usr/share/fonts/下创建一个目录(比如chinese)保存各种中文字体

@51stack
Copy link

51stack commented Jan 16, 2019

3QU

@PWA2000
Copy link

PWA2000 commented Nov 27, 2019

Trimming unused files from manifest...
Creating PDF Output...
67% Running PDF Output plugin
68% Parsed all content for markup transformation
70% Completed markup transformation
[18491:18491:1127/195515.139701:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

@JoanJiao
Copy link

JoanJiao commented Apr 1, 2020

Trimming unused files from manifest...
Creating PDF Output...
67% Running PDF Output plugin
68% Parsed all content for markup transformation
70% Completed markup transformation
[18491:18491:1127/195515.139701:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

I got the same error...have you solved this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants