Q: how do I share a pdf-tools installation between computers?

I use pdf-tools on two difference machines, and sync my .emacs.d between them via Dropbox.

I have installed pdf-tools through the package manager. pdf-info-epdfinfo-program points to the executable epdfinfo, which pdf-tools builds when installing. That's apparently a problem.

Formerly, I ran one machine on MacOS and another on Linux (Fedora), and neither one could use the other's epdfinfo executable. I now run one machine with Fedora and another with Ubuntu, and, surprisingly, I have the same problem despite both being Linux: the Fedora machine can't use the Ubuntu machine's epdfinfo and vice-versa. The error message suggests that it cannot one of the poppler libraries:

pdf-info-check-epdfinfo: Error running ‘/home/dan/Dropbox/.emacs.d/packages/pdf-tools-20170417.150/epdfinfo’: /home/dan/Dropbox/.emacs.d/packages/pdf-tools-20170417.150/epdfinfo: error while loading shared libraries: libpoppler.so.64: cannot open shared object file: No such file or directory

What I have done in the past is:

1) install pdf-tools on one machine and save a copy of its executable (say, as epdfinfo-alt),

2) install pdf-tools on the other machine,

3) copy epdfinfo-alt into the pdf-tools directory,

4) put a conditional statement in my init file like:

;; pseudocode
(when (eq machine machine-alt)
  (setq pdf-info-epdfinfo-program

Surely there is a better way to share a pdf-tools install between machines that are not running the same operating system or flavor of Linux. How do I do it without going to all this fiddly trouble?

  • What do you mean by 'neither one could use the other's epdfinfo'? What error did Emacs report when you tried? If you can solve the problem by saving the file in another location, it suggests there may be an issue with permissions or the executable bit - the name and location shouldn't matter on their own?
    – Tyler
    Nov 28, 2017 at 14:35
  • @Tyler: I've posted the error message. It can't find one of the shared libraries with which the executable is built (it relies on poppler).
    – Dan
    Nov 28, 2017 at 14:43
  • does your workaround, steps 1-4, require you compile epdfinfo on both machines, or have you been able to compile epdfinfo on one machine and use it on the other after renaming it? I suspect the libpoppler library has a different name or location on each system, a problem you shouldn't be able to fix just by renaming the executable
    – Tyler
    Nov 28, 2017 at 15:51
  • @Tyler: I wasn't clear enough. I install pdf-tools on each machine, which, in turn, compiles a different epdfinfo on each machine. However, I don't have to deal with the poppler issues once I have the two compiled executables, because I have the janky conditional statement in the init file that uses the executable made by the current machine.
    – Dan
    Nov 28, 2017 at 15:53
  • 1
    this is a long-standing feature request github.com/politza/pdf-tools/issues/154
    – Tyler
    Nov 28, 2017 at 20:32

1 Answer 1


pdf-tools requires a separate executable, epdfinfo, in order to function. This executable is distributed as source code within the pdf-tools package. As such, it gets compiled whenever you install or update the pdf-tools package.

This is convenient, as it provides one-step installation of the pdf-tools package, which includes code for installing the dependencies for epdfinfo automatically.

This is also a hassle, as it means epdfinfo gets compiled with every update of pdf-tools, whether or not it has actually changed. And, as you've discovered, it makes it non-trivial to sync your emacs config across different computers.

Syncing should work between any two computers on which the dependencies of epdfinfo have the same names and locations. That should mean computers with the same distro version (i.e., two machines that both run Debian Wheezy, or that both run Ubuntu 14.4), or that at least have the same file system hierarchy and library structure (i.e., Ubuntu 17 and the version of Debian that it was built from). But systems with different file system hierarchies or library packaging (Fedora vs Ubuntu) or OS (Mac vs Linux) will not produce cross-compatible binaries, so syncing won't work.

This issue has been raised with the pdf-tools developer, and he's receptive to splitting epdfinfo into a separate installation, eventually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.