pdf-tools
pdf-tools copied to clipboard
install pdf-tools without sudo privileges
Hello,
I tried to install pdf-tools within my doom-emacs setup. I know that i need to install some dependencies. I already asked my system admin to install these dependencies on my machine. However, when I try to install pdf-tools by M-x pdf-tools-install
, then emacs still ask me for my sudo password which I obviously do not have.
Is there a way to bypass this?
Another way to install is to install pdf-tools' package from your package manager. See: https://repology.org/project/emacs-pdf-tools/versions Contact your sys admin to install them for you then put
(pdf-loader-install)
in your config file and you're done.
Hi @Nathanael8 ,
There's definitely a way to install pdf-tools without sudo.
PDF tools only asks for sudo
in two cases:
- If it detects that all the system dependencies are not installed correctly.
- If the path where you are trying to install the pdf-tools server is not writeable.
Please review / share the dependencies that you've asked the sysadmin to install, and please review / share the value of pdf-info-epdfinfo-program
in your setup.
I'm not the OP, so my situation is different, but perhaps related enough to be useful.
I'm on my own Ubuntu 20.04 system, running GNU Emacs 26.3. I got this via package-install
:
http://melpa.org/packages/pdf-tools-20220214.344.tar
I ran M-x pdf-tools-install
, and it said:
Need to (re)build the epdfinfo program, do it now ? (y or n) y
with no explanation of why it needed to rebuild it.
If I answer "y" it asks for a sudo password, with no info on why that requires sudo
. With no evident info or clarity on any package signatures, provenance, etc, or evident listing of exactly what build commands it intends to run as root, that sets off my personal security alarm bells.
I'm guessing that I could somehow just tell it to install the server in a different place by setting INSTALL_DIR
somewhere, but I'm not sure how.
Thanks for any help you can provide!
To influence the install-directory for epdfinfo
you should set the variable pdf-info-epdfinfo-program
.
Note that this variable expects the full name of the epdfinfo
binary. (i.e. if you set it as "/path/to/bin/epdfinfo"), it will expect that "/path/to/bin" exists and will try to write the binary there. Set the variable, and then call M-x pdf-tools-install