简体   繁体   English

如何在 ubuntu 15.04 中安装 poppler?

[英]How to install poppler in ubuntu 15.04?

Poppler is a PDF rendering library based on the xpdf-3.0 code base. Poppler 是一个基于 xpdf-3.0 代码库的 PDF 渲染库。 I have already downloaded the tar.xz file from the official site http://poppler.freedesktop.org/ But I do not know what to do with this file我已经从官方网站http://poppler.freedesktop.org/下载了 tar.xz 文件,但我不知道如何处理这个文件

Is there any command to install or run?有安装或运行的命令吗?

PS - I am new to linux, so I don't know a lot about it yet.. PS - 我是 linux 的新手,所以我对它还不是很了解..

Not sure how it worked in 15.04, but I know in 16.04 (Xenial), the package's official name is poppler-utils :不确定它在 15.04 中是如何工作的,但我知道在 16.04 (Xenial) 中,该软件包的正式名称是poppler-utils

http://packages.ubuntu.com/xenial/poppler-utils http://packages.ubuntu.com/xenial/poppler-utils

And thus can be installed with:因此可以安装:

sudo apt-get install -y poppler-utils

The marked answer by codefreak is not correct if you need the poppler-command-line tools, such as pdftotext .如果您需要 poppler 命令行工具(例如pdftotext ,则 codefreak 的标记答案不正确。 Also, installing Python poppler via apt-get doesn't seem to play nice if you're on a customized system, eg one that is running off of the Anaconda distribution.此外,如果您使用的是定制系统(例如,在 Anaconda 发行版上运行的系统),通过 apt-get 安装 Python poppler 似乎效果不佳。

What you downloaded from poppler site is source code and you may not be expert enough to install it yourself.您从 poppler 站点下载的是源代码,您可能不够专业,无法自行安装。 For such situations, Ubuntu and other linux distros manage packages of popular software so you don't have to go through manual installation via source code.对于这种情况,Ubuntu 和其他 linux 发行版管理流行软件的包,因此您不必通过源代码进行手动安装。 In your case, poppler for python is available in package python-poppler which can be installed via Ubuntu's package manager apt.在您的情况下, python-poppler包中提供了适用于python-poppler ,该包可以通过 Ubuntu 的包管理器 apt 安装。

To install poppler python bindings open terminal and run this:要安装 poppler python 绑定,请打开终端并运行:

sudo apt-get install python-poppler

You should have poppler available in python then.那么你应该在python中使用poppler。

To search for such packages in future you can do apt-cache search poppler .以后要搜索此类包,您可以执行apt-cache search poppler It will list down all packages you can install via apt.它将列出您可以通过 apt 安装的所有软件包。

转到以下链接https://www.ubuntuupdates.org/package/core/focal/main/base/poppler-utils只需单击相应的框即可安装

First open the terminal go to that folder where your downloaded file is present, for example if it is "Downloads" folder, go like this 首先打开终端,转到下载文件所在的文件夹,例如,如果是“下载”文件夹,请执行此操作

cd Home/Downloads

And then use this command: 然后使用此命令:

tar -xJf your_file_name.tar.xz

Then import that file in your code and you can use it. 然后在您的代码中导入该文件,您就可以使用它。

so run these commands on you system所以在你的系统上运行这些命令

  • step 1 sudo apt-get update步骤 1 sudo apt-get update
  • step 2 sudo apt install -y software-properties-common步骤 2 sudo apt install -y software-properties-common
  • step 3 sudo apt update第 3 步sudo apt update
  • step 4 sudo add-apt-repository main步骤 4 sudo add-apt-repository main
  • step 5 sudo add-apt-repository universe步骤 5 sudo add-apt-repository universe
  • step 6 sudo add-apt-repository restricted第 6 步sudo add-apt-repository restricted
  • step 7 sudo add-apt-repository multiverse步骤 7 sudo add-apt-repository multiverse
  • step 8 apt-get install -y poppler-utils步骤 8 apt-get install -y poppler-utils

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM