将Poppler添加到Debian中的Path [英] Add Poppler to Path in Debian
问题描述
我刚刚使用以下命令在我的debian服务器上安装了poppler:
I have just installed poppler on my debian server using the command:
sudo apt-get install poppler-utils
sudo apt-get install poppler-utils
但是,当我执行命令时:
However, when I execute the command:
pdftocairo-帮助
pdftocairo --help
找不到该函数,因此我假设此程序尚未自动链接到我的PATH变量中.我的问题是我对Linux不太熟悉,也不知道如何找出poppler的安装位置,也不知道如何从现有的PATH位置创建指向Poppler的链接文件.
The function cannot be found, so I assume this program has not automatically linked into my PATH variable. My issue is that I am not very experienced with Linux and I don't know how to find out where poppler installed, nor how to create a link file to Poppler from an existing included PATH location.
任何帮助将不胜感激,尤其是如果有人可以解释我如何知道这些程序将自己安装在何处.
Any help would be appreciated, especially if someone can explain how I know where these programs are installing themselves.
推荐答案
您不需要对PATH
做任何事情-这是维护人员的任务,使所有事情都按预期进行".
you should not need to do anything with the PATH
- it's the maintainer's task to make everything work "as expected".
您的问题可能有几个原因:
your problem could have several reasons:
- 您的
poppler-utils
版本不带有pdftocairo
二进制文件 - 您的
poppler-utils
版本将pdftocairo
插入到不在PATH
中的路径中
- 您(或其他人)已经将
PATH
弄乱了,因此它不包含poppler-utils
将二进制文件安装到的目录.
- your version of
poppler-utils
does not come with thepdftocairo
binary - your version of
poppler-utils
insatllspdftocairo
into a path that is not in yourPATH
- you (or somebody else) have messed with the
PATH
, so it doesn't contain the directory wherepoppler-utils
installed the binaries to any more.
,因此首先检查poppler-utils
是否安装文件(以及安装位置).
以下将为您提供该软件包安装的所有文件的列表:
so first check whether poppler-utils
installs the file (and where to).
the following will give you a list of all files installed by the package:
$ dpkg -L poppler-utils
[...]
/usr/bin/pdftops
/usr/bin/pdftocairo
/usr/bin/pdftohtml
[...]
如您所见,
在我的系统上-已安装poppler-utils 0.18.4-6
-程序包将pdftocairo
安装到/usr/bin
中,这是所有应用程序的 default 路径,并且应该已经进入您的路径.
as you can see, on my system - which has poppler-utils 0.18.4-6
installed - the package installed a pdftocairo
into /usr/bin
which is the default path for all applications, and which should already be in your PATH.
要检查您的PATH变量,请执行类似的操作
to check your PATH variable do something like
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
如您所见,
我的PATH
包含/usr/bin
,实际上我可以做到:
as you can see, my PATH
contains /usr/bin
, and indeed i can do:
$ pdftocairo --help
pdftocairo version 0.18.4
Copyright 2005-2011 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2004 Glyph & Cog, LLC
[...]
如果您的PATH
不包含/usr/bin
,则说明您的系统存在严重问题(例如,您尝试更改路径并意外删除了所有先前的设置).
if your PATH
does not contain /usr/bin
, then something is seriously wrong with your system (for instance, you have tried changing your path and accidentally removed all the previous settings).
在任何情况下,向PATH添加新路径都是非常简单的.所有路径都用冒号分隔,因此您应该执行以下操作:
in any case, adding a new path to PATH is quite simple; all paths are separated by colons, so you should do something like the following:
$ export PATH=/path/to/my/bin:${PATH}
这将在搜索路径的开头添加/path/to/my/bin/
,因此现在将首先在/path/to/my/bin/
中搜索所有二进制文件,然后在/usr/local/bin
中搜索,等等.
this will add /path/to/my/bin/
at the beginning of the search-path, so all binaries will now be searched first in /path/to/my/bin/
and then /usr/local/bin
and so forth.
这篇关于将Poppler添加到Debian中的Path的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!